xfs: add helpers to dispose of old btree blocks after a repair
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 30 May 2018 05:18:10 +0000 (22:18 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 30 May 2018 15:03:14 +0000 (08:03 -0700)
commit12c6510e2ff17cf94cae08ba7b6d2355760dfd1d
tree1d76ee415983bf1ede5b078c1a2ecd529560fd86
parent64a39d876e77264dbd06ec27564d9e4eed1c6786
xfs: add helpers to dispose of old btree blocks after a repair

Now that we've plumbed in the ability to construct a list of dead btree
blocks following a repair, add more helpers to dispose of them.  This is
done by examining the rmapbt -- if the btree was the only owner we can
free the block, otherwise it's crosslinked and we can only remove the
rmapbt record.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/repair.c
fs/xfs/scrub/repair.h