summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_priv.h
diff options
context:
space:
mode:
authorBrian Foster2015-08-19 01:58:36 +0200
committerDave Chinner2015-08-19 01:58:36 +0200
commitf0b2efad16e78623b5a156f6e4e9166907b83155 (patch)
tree82ebc3e9a7524046d748dd0bebae3caeb9bc91fd /fs/xfs/xfs_log_priv.h
parentxfs: use EFI refcount consistently in log recovery (diff)
downloadkernel-qcow2-linux-f0b2efad16e78623b5a156f6e4e9166907b83155.tar.gz
kernel-qcow2-linux-f0b2efad16e78623b5a156f6e4e9166907b83155.tar.xz
kernel-qcow2-linux-f0b2efad16e78623b5a156f6e4e9166907b83155.zip
xfs: don't leave EFIs on AIL on mount failure
Log recovery occurs in two phases at mount time. In the first phase, EFIs and EFDs are processed and potentially cancelled out. EFIs without EFD objects are inserted into the AIL for processing and recovery in the second phase. xfs_mountfs() runs various other operations between the phases and is thus subject to failure. If failure occurs after the first phase but before the second, pending EFIs sit on the AIL, pin it and cause the mount to hang. Update the mount sequence to ensure that pending EFIs are cancelled in the event of failure. Add a recovery cancellation mechanism to iterate the AIL and cancel all EFI items when requested. Plumb cancellation support through the log mount finish helper and update xfs_mountfs() to invoke cancellation in the event of failure after recovery has started. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_log_priv.h')
-rw-r--r--fs/xfs/xfs_log_priv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index 1c87c8abfbed..950f3f94720c 100644
--- a/fs/xfs/xfs_log_priv.h
+++ b/fs/xfs/xfs_log_priv.h
@@ -426,6 +426,8 @@ xlog_recover(
extern int
xlog_recover_finish(
struct xlog *log);
+extern int
+xlog_recover_cancel(struct xlog *);
extern __le32 xlog_cksum(struct xlog *log, struct xlog_rec_header *rhead,
char *dp, int size);