xfs: move orphan files to the orphanage
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:55 +0000 (14:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:58:56 +0000 (14:58 -0700)
commit1e58a8ccf2597c9259a8e71a2bffac5e11e12ea0
treef359020c4ae7dbfb820fb2f15cd1e67bd4da4794
parent34c9382c128270d0f4c8b36783b30f3c8085b2dd
xfs: move orphan files to the orphanage

When we're repairing a directory structure or fixing the dotdot entry of
a subdirectory, it's possible that we won't ever find a parent for the
subdirectory.  When this is the case, move it to the orphanage, aka
/lost+found.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Documentation/filesystems/xfs/xfs-online-fsck-design.rst
fs/xfs/Makefile
fs/xfs/scrub/dir_repair.c
fs/xfs/scrub/orphanage.c [new file with mode: 0644]
fs/xfs/scrub/orphanage.h [new file with mode: 0644]
fs/xfs/scrub/parent_repair.c
fs/xfs/scrub/scrub.c
fs/xfs/scrub/scrub.h
fs/xfs/scrub/trace.h
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.h