xfs: online repair of directories
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:51 +0000 (14:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:58:55 +0000 (14:58 -0700)
commitb1991ee3e7cf852e95a3498801303cfbb4468681
treeece0ae35a9233b1a1fcb4964cbe4f8567e8daf29
parent8d81082a8c9541bdf6164c4639dc1936209fe1c4
xfs: online repair of directories

If a directory looks like it's in bad shape, try to sift through the
rubble to find whatever directory entries we can, scan the directory
tree for the parent (if needed), stage the new directory contents in a
temporary file and use the atomic extent swapping mechanism to commit
the results in bulk.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
15 files changed:
fs/xfs/Makefile
fs/xfs/scrub/dir.c
fs/xfs/scrub/dir_repair.c [new file with mode: 0644]
fs/xfs/scrub/inode_repair.c
fs/xfs/scrub/nlinks.c
fs/xfs/scrub/nlinks_repair.c
fs/xfs/scrub/parent.c
fs/xfs/scrub/readdir.c
fs/xfs/scrub/repair.c
fs/xfs/scrub/repair.h
fs/xfs/scrub/scrub.c
fs/xfs/scrub/tempfile.c
fs/xfs/scrub/tempfile.h
fs/xfs/scrub/trace.h
fs/xfs/scrub/xfblob.h