xfs: adjust parent pointer scrubber for sb-rooted metadata files
authorDarrick J. Wong <djwong@kernel.org>
Mon, 4 Nov 2024 04:18:59 +0000 (20:18 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 5 Nov 2024 21:38:33 +0000 (13:38 -0800)
commitaec2eb7da8f777998164a8ce4e38b84fd0136f97
treec88f0fe712cb40662c62cf4deee95814d5b12020
parent91fb4232be87caf89edddcf66c6d029552f06bb9
xfs: adjust parent pointer scrubber for sb-rooted metadata files

Starting with the metadata directory feature, we're allowed to call the
directory and parent pointer scrubbers for every metadata file,
including the ones that are children of the superblock.

For these children, checking the link count against the number of parent
pointers is a bit funny -- there's no such thing as a parent pointer for
a child of the superblock since there's no corresponding dirent.  For
purposes of validating nlink, we pretend that there is a parent pointer.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/parent.c
fs/xfs/scrub/parent_repair.c