Hi all, This is the second part of correcting XFS to reload the incore unlinked inode list from the ondisk contents. Whereas part one tackled failures from regular filesystem calls, this part takes on the problem of needing to reload the entire incore unlinked inode list on account of somebody loading an inode that's in the /middle/ of an unlinked list. This happens during quotacheck, bulkstat, or even opening a file by handle. In this case we don't know the length of the list that we're reloading, so we don't want to create a new unbounded memory load while holding resources locked. Instead, we'll target UNTRUSTED iget calls to reload the entire bucket. Note that this changes the definition of the incore unlinked inode list slightly -- i_prev_unlinked == 0 now means "not on the incore list". If you're going to start using this code, I strongly recommend pulling from my git trees, which are linked below. This has been lightly tested with fstests. Enjoy! Comments and questions are, as always, welcome. --D kernel git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=fix-iunlink-list-6.6 --- fs/xfs/xfs_export.c | 6 +++ fs/xfs/xfs_icache.c | 2 - fs/xfs/xfs_inode.c | 115 +++++++++++++++++++++++++++++++++++++++++++++++++-- fs/xfs/xfs_inode.h | 34 ++++++++++++++- fs/xfs/xfs_itable.c | 9 ++++ fs/xfs/xfs_mount.h | 7 +++ fs/xfs/xfs_qm.c | 7 +++ fs/xfs/xfs_trace.h | 20 +++++++++ 8 files changed, 193 insertions(+), 7 deletions(-)