]> www.infradead.org Git - users/hch/xfs.git/commit
xfs: refactor directory tree root predicates
authorDarrick J. Wong <djwong@kernel.org>
Wed, 7 Aug 2024 22:54:19 +0000 (15:54 -0700)
committerChristoph Hellwig <hch@lst.de>
Sun, 22 Sep 2024 06:07:19 +0000 (08:07 +0200)
commitcce653ff32db3652a84923e1e096e7d7b454187f
tree33fdd4c11c94f42ab624e04b8278d1189b509032
parenta53f6454b4fe7d149f1c857ef396500923e698b6
xfs: refactor directory tree root predicates

Metadata directory trees make reasoning about the parent of a file more
difficult.  Traditionally, user files are children of sb_rootino, and
metadata files are "children" of the superblock.  Now, we add a third
possibility -- some metadata files can be children of sb_metadirino, but
the classic ones (rt free space data and quotas) are left alone.

Let's add some helper functions (instead of open-coding the logic
everywhere) to make scrub logic easier to understand.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 files changed:
fs/xfs/scrub/common.c
fs/xfs/scrub/common.h
fs/xfs/scrub/dir.c
fs/xfs/scrub/dir_repair.c
fs/xfs/scrub/dirtree.c
fs/xfs/scrub/dirtree.h
fs/xfs/scrub/findparent.c
fs/xfs/scrub/inode_repair.c
fs/xfs/scrub/nlinks.c
fs/xfs/scrub/nlinks_repair.c
fs/xfs/scrub/orphanage.c
fs/xfs/scrub/parent.c
fs/xfs/scrub/parent_repair.c