xfs: use per-AG bitmaps to reap unused AG metadata blocks during repair
The AGFL repair code uses a series of bitmaps to figure out where there are OWN_AG blocks that are not claimed by the free space and rmap btrees. These blocks become the new AGFL, and any overflow is reaped. The bitmaps current track xfs_fsblock_t even though we already know the AG number. In the last patch, we introduced a new bitmap "type" for tracking xfs_agblock_t extents. Port the reaping code and the AGFL repair to use this new type, which makes it very obvious what we're tracking. This also eliminates a bunch of unnecessary agblock <-> fsblock conversions. Signed-off-by:Darrick J. Wong <djwong@kernel.org> Reviewed-by:
Dave Chinner <dchinner@redhat.com>
Showing
- fs/xfs/scrub/agheader_repair.c 34 additions, 40 deletionsfs/xfs/scrub/agheader_repair.c
- fs/xfs/scrub/bitmap.c 3 additions, 38 deletionsfs/xfs/scrub/bitmap.c
- fs/xfs/scrub/bitmap.h 2 additions, 4 deletionsfs/xfs/scrub/bitmap.h
- fs/xfs/scrub/reap.c 4 additions, 10 deletionsfs/xfs/scrub/reap.c
- fs/xfs/scrub/reap.h 2 additions, 3 deletionsfs/xfs/scrub/reap.h
Please register or sign in to comment