public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET 0/3] xfs: reload entire iunlink lists
@ 2023-09-03 16:15 Darrick J. Wong
  2023-09-03 16:15 ` [PATCH 1/3] xfs: use i_prev_unlinked to distinguish inodes that are not on the unlinked list Darrick J. Wong
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Darrick J. Wong @ 2023-09-03 16:15 UTC (permalink / raw)
  To: chandan.babu, djwong; +Cc: linux-xfs, david

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(-)


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-09-07 21:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-03 16:15 [PATCHSET 0/3] xfs: reload entire iunlink lists Darrick J. Wong
2023-09-03 16:15 ` [PATCH 1/3] xfs: use i_prev_unlinked to distinguish inodes that are not on the unlinked list Darrick J. Wong
2023-09-07  6:27   ` Dave Chinner
2023-09-03 16:15 ` [PATCH 2/3] xfs: reload entire unlinked bucket lists Darrick J. Wong
2023-09-07  7:02   ` Dave Chinner
2023-09-07 18:30     ` Darrick J. Wong
2023-09-03 16:16 ` [PATCH 3/3] xfs: make inode unlinked bucket recovery work with quotacheck Darrick J. Wong
2023-09-05 16:33   ` [PATCH v1.1 " Darrick J. Wong
2023-09-07  7:11     ` Dave Chinner
2023-09-07 18:34       ` Darrick J. Wong
2023-09-07 21:40         ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox