diff options
author | Christoph Hellwig <hch@lst.de> | 2024-11-03 20:19:03 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-11-05 13:38:35 -0800 |
commit | dcfc65befb76dfcb6fa1e49a3c2cc60f3f53a337 (patch) | |
tree | 082f4efb737baf869bc169a463980f01ed07f24f /fs/xfs/xfs_bmap_util.h | |
parent | 0d2c636e489c115add86bd66952880f92b5edab7 (diff) |
xfs: clean up xfs_getfsmap_helper arguments
The calling conventions for xfs_getfsmap_helper are confusing -- callers
pass in an rmap record, but they must also supply startblock and
blockcount in daddr units. This was bolted onto the original fsmap
implementation so that we could report *something* for realtime
volumes, which do not support rmap and hence can draw only from the rt
free space bitmap. Free space on the rt volume can be more than 2^32
fsblocks long, which means that we can't use the rmap startblock or
blockcount fields.
This is confusing for callers, because they must supplying redundant
data, but not all of it is used. Streamline this by creating a separate
fsmap irec structure that contains exactly the data we need, once.
Note that we actually do need rm_startblock for rmap key comparisons
when we're actually querying an rmap btree, so leave that field but
document why it's there.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_bmap_util.h')
0 files changed, 0 insertions, 0 deletions