diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-12-15 10:03:30 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-12-15 10:03:30 -0800 |
commit | 6ece924b95226235059ed2ffc2c0f44a124c5910 (patch) | |
tree | 7f273980557559ca029a60ca5477e200e21969aa /fs/xfs/scrub/reap.c | |
parent | e069d549705e49841247acf9b3176744e27d5425 (diff) |
xfs: create separate structures and code for u32 bitmaps
Create a version of the xbitmap that handles 32-bit integer intervals
and adapt the xfs_agblock_t bitmap to use it. This reduces the size of
the interval tree nodes from 48 to 36 bytes and enables us to use a more
efficient slab (:0000040 instead of :0000048) which allows us to pack
more nodes into a single slab page (102 vs 85).
As a side effect, the users of these bitmaps no longer have to convert
between u32 and u64 quantities just to use the bitmap; and the hairy
overflow checking code in xagb_bitmap_test goes away.
Later in this patchset we're going to add bitmaps for xfs_agino_t,
xfs_rgblock_t, and xfs_dablk_t, so the increase in code size (5622 vs.
9959 bytes) seems worth it.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/scrub/reap.c')
-rw-r--r-- | fs/xfs/scrub/reap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/scrub/reap.c b/fs/xfs/scrub/reap.c index 300f49e8e14a..b1f112ecc062 100644 --- a/fs/xfs/scrub/reap.c +++ b/fs/xfs/scrub/reap.c @@ -430,13 +430,12 @@ xreap_agextent_iter( */ STATIC int xreap_agmeta_extent( - uint64_t fsbno, - uint64_t len, + uint32_t agbno, + uint32_t len, void *priv) { struct xreap_state *rs = priv; struct xfs_scrub *sc = rs->sc; - xfs_agblock_t agbno = fsbno; xfs_agblock_t agbno_next = agbno + len; int error = 0; |