]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: split the per-btree union in struct xfs_btree_cur
authorChristoph Hellwig <hch@lst.de>
Mon, 22 Apr 2024 17:01:01 +0000 (10:01 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 3 Jun 2024 18:37:38 +0000 (11:37 -0700)
commit6aba4616e4528eaaa63549e622090b79fd265ed0
tree515b7635690b10312f9699ed4a093a8cb9e9e708
parent6a091d545e8774e40a9cea9f7101627d8c5b2c6d
xfs: split the per-btree union in struct xfs_btree_cur

Source kernel commit: 88ee2f4849119b82b95d6e8e2d9daa81214eb080

Split up the union that encodes btree-specific fields in struct
xfs_btree_cur.  Most fields in there are specific to the btree type
encoded in xfs_btree_ops.type, and we can use the obviously named union
for that.  But one field is specific to the bmapbt and two are shared by
the refcount and rtrefcountbt.  Move those to a separate union to make
the usage clear and not need a separate struct for the refcount-related
fields.

This will also make unnecessary some very awkward btree cursor
refc/rtrefc switching logic in the rtrefcount patchset.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
libxfs/xfs_bmap.c
libxfs/xfs_bmap_btree.c
libxfs/xfs_btree.c
libxfs/xfs_btree.h
libxfs/xfs_btree_staging.c
libxfs/xfs_refcount.c
libxfs/xfs_refcount_btree.c