xfs: fix corruptions in the directory tree
authorDarrick J. Wong <djwong@kernel.org>
Mon, 22 Apr 2024 16:48:22 +0000 (09:48 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 23 Apr 2024 23:55:17 +0000 (16:55 -0700)
commit3f31406aef493b3f19020909d29974e28253f91c
treec064e7aee0ce09ea1a410d0178d32fa091ac008d
parent37056912d5721324ac28787a4f903798f7361099
xfs: fix corruptions in the directory tree

Repair corruptions in the directory tree itself.  Cycles are broken by
removing an incoming parent->child link.  Multiply-owned directories are
fixed by pruning the extra parent -> child links  Disconnected subtrees
are reconnected to the lost and found.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/Makefile
fs/xfs/scrub/dirtree.c
fs/xfs/scrub/dirtree.h
fs/xfs/scrub/dirtree_repair.c [new file with mode: 0644]
fs/xfs/scrub/orphanage.c
fs/xfs/scrub/orphanage.h
fs/xfs/scrub/repair.h
fs/xfs/scrub/scrub.c
fs/xfs/scrub/trace.h
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.h