]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: make xfs_rtblock_t a segmented address like xfs_fsblock_t
authorDarrick J. Wong <djwong@kernel.org>
Mon, 25 Nov 2024 21:14:25 +0000 (13:14 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 24 Dec 2024 02:01:31 +0000 (18:01 -0800)
commit606a37448e30d9f824ba8137510ef6ad0f638d39
treefb9ab387cfab5819edef6bdccf7701967905c7a6
parent7901a592698c4bd0d1c19ce93a4f058ff19df0ee
xfs: make xfs_rtblock_t a segmented address like xfs_fsblock_t

Source kernel commit: 7195f240c6578caa9e24202a26aa612a7e8cba26

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