]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs: make xfs_rtblock_t a segmented address like xfs_fsblock_t
authorDarrick J. Wong <djwong@kernel.org>
Tue, 15 Oct 2024 23:44:17 +0000 (16:44 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 1 Nov 2024 20:44:51 +0000 (13:44 -0700)
commita76b8482f98bc1f4143ca8463488fcbe1f21fe7d
treeeefd9038fd9f4c03022c881b65fac91814d0cce3
parent0186eb78d071880229d40934c5a52add36a2929f
xfs: make xfs_rtblock_t a segmented address like xfs_fsblock_t

Now that we've finished adding allocation groups to the realtime volume,
let's make the file block mapping address (xfs_rtblock_t) a segmented
value just like we do on the data device.  This means that group number
and block number conversions can be done with shifting and masking
instead of integer division.

While in theory we could continue caching the rgno shift value in
m_rgblklog, the fact that we now always use the shift value means that
we have an opportunity to increase the redundancy of the rt geometry by
storing it in the ondisk superblock and adding more sb verifier code.
Extend the sueprblock to store the rgblklog value.

Now that we have segmented addresses, set the correct values in
m_groups[XG_TYPE_RTG] so that the xfs_group helpers work correctly.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
include/xfs_mount.h
libxfs/xfs_bmap.c
libxfs/xfs_format.h
libxfs/xfs_ondisk.h
libxfs/xfs_rtbitmap.h
libxfs/xfs_rtgroup.h
libxfs/xfs_sb.c
libxfs/xfs_sb.h
libxfs/xfs_types.c