xfs: fix reloading entire unlinked bucket lists
authorDarrick J. Wong <djwong@kernel.org>
Sun, 24 Sep 2023 15:35:53 +0000 (08:35 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 25 Sep 2023 01:12:13 +0000 (18:12 -0700)
commit537c013b140d373d1ffe6290b841dc00e67effaa
tree2a9b076ead1be5eb3d90030a7f5ef4b87f3961ae
parent6465e260f48790807eef06b583b38ca9789b6072
xfs: fix reloading entire unlinked bucket lists

During review of the patcheset that provided reloading of the incore
iunlink list, Dave made a few suggestions, and I updated the copy in my
dev tree.  Unfortunately, I then got distracted by ... who even knows
what ... and forgot to backport those changes from my dev tree to my
release candidate branch.  I then sent multiple pull requests with stale
patches, and that's what was merged into -rc3.

So.

This patch re-adds the use of an unlocked iunlink list check to
determine if we want to allocate the resources to recreate the incore
list.  Since lost iunlinked inodes are supposed to be rare, this change
helps us avoid paying the transaction and AGF locking costs every time
we open any inode.

This also re-adds the shutdowns on failure, and re-applies the
restructuring of the inner loop in xfs_inode_reload_unlinked_bucket, and
re-adds a requested comment about the quotachecking code.

Retain the original RVB tag from Dave since there's no code change from
the last submission.

Fixes: 68b957f64fca1 ("xfs: load uncached unlinked inodes into memory on demand")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/xfs_export.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_itable.c
fs/xfs/xfs_qm.c