]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: refactor directory tree root predicates
authorDarrick J. Wong <djwong@kernel.org>
Mon, 4 Nov 2024 04:18:57 +0000 (20:18 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 5 Nov 2024 21:38:33 +0000 (13:38 -0800)
commit679b098b59cf6d0fc10f2f66c68af4202686cbf9
tree8558fd9c26a26f7b1ed6ab600073ee3491c7577c
parentbe42fc1393d66024eb6415c92f45fab5d1878c3e
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