xfs: repair inode btrees
authorDarrick J. Wong <djwong@kernel.org>
Fri, 15 Dec 2023 18:03:32 +0000 (10:03 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 15 Dec 2023 18:03:32 +0000 (10:03 -0800)
commitdbfbf3bdf639a20da7d5fb390cd2e197d25aa418
treee4a0860335f21f150ac0a0016741cf315caaf988
parent4bdfd7d15747b170ce93a06fafccaf20544b6684
xfs: repair inode btrees

Use the rmapbt to find inode chunks, query the chunks to compute hole
and free masks, and with that information rebuild the inobt and finobt.
Refer to the case study in
Documentation/filesystems/xfs-online-fsck-design.rst for more details.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/Makefile
fs/xfs/libxfs/xfs_ialloc.c
fs/xfs/libxfs/xfs_ialloc.h
fs/xfs/scrub/common.c
fs/xfs/scrub/ialloc.c
fs/xfs/scrub/ialloc_repair.c [new file with mode: 0644]
fs/xfs/scrub/repair.c
fs/xfs/scrub/repair.h
fs/xfs/scrub/scrub.c
fs/xfs/scrub/scrub.h
fs/xfs/scrub/trace.h