diff options
| author | Darrick J. Wong <[email protected]> | 2023-10-16 16:37:07 +0000 |
|---|---|---|
| committer | Darrick J. Wong <[email protected]> | 2023-10-17 23:24:22 +0000 |
| commit | 5dc3a80d46a450481df7f7e9fe673ba3eb4514c3 (patch) | |
| tree | de8d5c6d78a0fb032d39ffbc73d59a8e12776549 /fs/xfs/libxfs/xfs_rtbitmap.c | |
| parent | xfs: create a helper to convert extlen to rtextlen (diff) | |
| download | kernel-5dc3a80d46a450481df7f7e9fe673ba3eb4514c3.tar.gz kernel-5dc3a80d46a450481df7f7e9fe673ba3eb4514c3.zip | |
xfs: create helpers to convert rt block numbers to rt extent numbers
Create helpers to do unit conversions of rt block numbers to rt extent
numbers. There are three variations -- one to compute the rt extent
number from an rt block number; one to compute the offset of an rt block
within an rt extent; and one to extract both.
Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'fs/xfs/libxfs/xfs_rtbitmap.c')
| -rw-r--r-- | fs/xfs/libxfs/xfs_rtbitmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_rtbitmap.c b/fs/xfs/libxfs/xfs_rtbitmap.c index f64e4aeb393b..383c6437e042 100644 --- a/fs/xfs/libxfs/xfs_rtbitmap.c +++ b/fs/xfs/libxfs/xfs_rtbitmap.c @@ -1024,13 +1024,13 @@ xfs_rtfree_blocks( ASSERT(rtlen <= XFS_MAX_BMBT_EXTLEN); - len = div_u64_rem(rtlen, mp->m_sb.sb_rextsize, &mod); + len = xfs_rtb_to_rtxrem(mp, rtlen, &mod); if (mod) { ASSERT(mod == 0); return -EIO; } - start = div_u64_rem(rtbno, mp->m_sb.sb_rextsize, &mod); + start = xfs_rtb_to_rtxrem(mp, rtbno, &mod); if (mod) { ASSERT(mod == 0); return -EIO; |
