]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: cancel intents immediately if process_intents fails
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 19 Oct 2020 16:28:02 +0000 (09:28 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 21 Oct 2020 23:28:46 +0000 (16:28 -0700)
commit7d16b140edcc6c4fe57f5a90e2bc82ab40eb950f
treec0cdb97658a37abdf06430eba8790daf928d66af
parent6bd051cfb4bd58f05b11e52e3b63108a28dbf26b
xfs: cancel intents immediately if process_intents fails

If processing recovered log intent items fails, we need to cancel all
the unprocessed recovered items immediately so that a subsequent AIL
push in the bail out path won't get wedged on the pinned intent items
that didn't get processed.

This can happen if the log contains (1) an intent that gets and releases
an inode, (2) an intent that cannot be recovered successfully, and (3)
some third intent item.  When recovery of (2) fails, we leave (3) pinned
in memory.  Inode reclamation is called in the error-out path of
xfs_mountfs before xfs_log_cancel_mount.  Reclamation calls
xfs_ail_push_all_sync, which gets stuck waiting for (3).

Therefore, call xlog_recover_cancel_intents if _process_intents fails.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/xfs_log_recover.c