]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: don't leave EFIs on AIL on mount failure
authorBrian Foster <bfoster@redhat.com>
Tue, 18 Aug 2015 23:58:36 +0000 (09:58 +1000)
committerJack Vogel <jack.vogel@oracle.com>
Mon, 9 Apr 2018 23:01:34 +0000 (16:01 -0700)
commitbe284789c7655a3a4fff108af1c1f102e19039ca
tree1417e5b705ec042a3202eadbfdb92ece1fb10fa3
parentc23ec20dd15554282f1440b184ae7a9cd76a4730
xfs: don't leave EFIs on AIL on mount failure

[ Upstream commit f0b2efad16e78623b5a156f6e4e9166907b83155 ]

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.

Orabug: 27609404
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: wen.gang.wang@oracle.com
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
fs/xfs/xfs_log.c
fs/xfs/xfs_log.h
fs/xfs/xfs_log_priv.h
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_mount.c