On Sun, Mar 07, 2021 at 08:48:37PM -0800, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > If we allocate quota inodes in the process of mounting a filesystem but > then decide to abort the mount, it's possible that the quota inodes are > sitting around pinned by the log. Now that inode reclaim relies on the > AIL to flush inodes, we have to force the log and push the AIL in > between releasing the quota inodes and kicking off reclaim to tear down > all the incore inodes. Do this by extracting the bits we need from the > unmount path and reusing them; as an added bonus, failed writes during > a failed mount will not retry forever. > > This was originally found during a fuzz test of metadata directories > (xfs/1546), but the actual symptom was that reclaim hung up on the quota > inodes. > > Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> > --- > v2.1: consolidate the comments. > --- > fs/xfs/xfs_mount.c | 90 +++++++++++++++++++++++++--------------------------- > 1 file changed, 44 insertions(+), 46 deletions(-) Looks good. Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> -- Dave Chinner david@xxxxxxxxxxxxx