]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: add group based bno conversion helpers
authorChristoph Hellwig <hch@lst.de>
Mon, 25 Nov 2024 21:14:15 +0000 (13:14 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 24 Dec 2024 02:01:24 +0000 (18:01 -0800)
commit5214e3c4368219161ac58a00cb15839b7a82e281
treed7bd0ec51bc02a57c9ee386eeae89781266eec6b
parent1fa5e300cb25ec3621bb70cf3e4a68b0e2404e5a
xfs: add group based bno conversion helpers

Source kernel commit: 759cc1989a53024066b0f2ea52c206b4ff8f522c

Add/move the blocks, blklog and blkmask fields to the generic groups
structure so that code can work with AGs and RTGs by just using the
right index into the array.

Then, add convenience helpers to convert block numbers based on the
generic group.  This will allow writing code that doesn't care if it is
used on AGs or the upcoming realtime groups.

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: Christoph Hellwig <hch@lst.de>
include/xfs_mount.h
libxfs/libxfs_api_defs.h
libxfs/xfs_group.c
libxfs/xfs_group.h
libxfs/xfs_sb.c
repair/bmap_repair.c