xfs: move the post-repair block reaping code to a separate file
authorDarrick J. Wong <djwong@kernel.org>
Thu, 10 Aug 2023 14:48:01 +0000 (07:48 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 10 Aug 2023 14:48:01 +0000 (07:48 -0700)
commite06ef14b9f8eb5edab8c466680818d436eefdff0
tree02e0113d8c6d1509551c32587688657166af06fc
parent86a464179cef7185ad9e540d51063e7f196e55ba
xfs: move the post-repair block reaping code to a separate file

Reaping blocks after a repair is a complicated affair involving a lot of
rmap btree lookups and figuring out if we're going to unmap or free old
metadata blocks that might be crosslinked.  Eventually, we will need to
be able to reap per-AG metadata blocks, bmbt blocks from inode forks,
garbage CoW staging extents, and (even later) blocks from btrees rooted
in inodes.  This results in a lot of reaping code, so we might as well
split that off while it's easy.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/Makefile
fs/xfs/scrub/agheader_repair.c
fs/xfs/scrub/reap.c [new file with mode: 0644]
fs/xfs/scrub/reap.h [new file with mode: 0644]
fs/xfs/scrub/repair.c
fs/xfs/scrub/repair.h