]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs_repair: slab and bag structs need to track more than 2^32 items
authorDarrick J. Wong <djwong@djwong.org>
Mon, 15 Apr 2024 23:07:49 +0000 (16:07 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 17 Apr 2024 21:06:28 +0000 (14:06 -0700)
commitd4bd0b1b107802bd9417963450dd33847fb4f323
tree3065995a8293d49615e0cef442f88a6ce6aca86d
parente9984a42251bf863c6a6ca7cc4dc526c80654187
xfs_repair: slab and bag structs need to track more than 2^32 items

Currently, the xfs_slab data structure in xfs_repair is used to stage
incore reverse mapping and reference count records to build the ondisk
rmapbt and refcountbt during phase 5.

On a reflink filesystem, it's possible for there to be more than 2^32
forward mappings in an AG, which means that there could be more than
2^32 rmapbt records too.  Widen the size_t fields of xfs_slab to u64
accomodate this.

Similarly, the xfs_bag structure holds pointers to xfs_slab objects.
This abstraction tracks rmapbt records as we walk through the AG space
building refcount records.  It's possible for there to be more than 2^32
mappings to a piece of physical space, so we need to side the size_t
fields of xfs_bag to u64 as well.

In the next patch we'll fix all the users of these two structures; this
is merely the preparatory patch.

Signed-off-by: Darrick J. Wong <djwong@djwong.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
repair/slab.c
repair/slab.h