xfs: repair refcount btrees
authorDarrick J. Wong <djwong@kernel.org>
Fri, 15 Dec 2023 18:03:33 +0000 (10:03 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 15 Dec 2023 18:03:33 +0000 (10:03 -0800)
commit9099cd38002f8029c9a1da08e6832d1cd18e8451
tree753066f947410a50279f2da91e118d89740ebfc8
parentdbfbf3bdf639a20da7d5fb390cd2e197d25aa418
xfs: repair refcount btrees

Reconstruct the refcount data from the rmap btree.

Link: https://docs.kernel.org/filesystems/xfs-online-fsck-design.html#case-study-rebuilding-the-space-reference-counts
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 files changed:
fs/xfs/Makefile
fs/xfs/libxfs/xfs_ag.h
fs/xfs/libxfs/xfs_btree.c
fs/xfs/libxfs/xfs_btree.h
fs/xfs/libxfs/xfs_refcount.c
fs/xfs/libxfs/xfs_refcount.h
fs/xfs/libxfs/xfs_refcount_btree.c
fs/xfs/scrub/refcount.c
fs/xfs/scrub/refcount_repair.c [new file with mode: 0644]
fs/xfs/scrub/repair.h
fs/xfs/scrub/scrub.c
fs/xfs/scrub/trace.h