]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: add group based bno conversion helpers
authorChristoph Hellwig <hch@lst.de>
Mon, 4 Nov 2024 04:18:45 +0000 (20:18 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 5 Nov 2024 21:38:29 +0000 (13:38 -0800)
commit759cc1989a53024066b0f2ea52c206b4ff8f522c
tree9fc7be0d3896d3f6b23235c88bc2c907c651c304
parent198febb9fe653503f94edc080529fa9e1e22d359
xfs: add group based bno conversion helpers

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>
fs/xfs/libxfs/xfs_group.c
fs/xfs/libxfs/xfs_group.h
fs/xfs/libxfs/xfs_sb.c
fs/xfs/xfs_mount.h