diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-10-16 09:48:20 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-10-18 10:58:58 -0700 |
commit | d0448fe76ac1a9ccbce574577a4c82246d17eec4 (patch) | |
tree | acec3f73d1e01b5589bb8daac4bcca6ef2fa301e /fs/xfs/xfs_rtalloc.c | |
parent | 097b4b7b64ef67a4703b89fd4064480b61557fd5 (diff) |
xfs: create helpers for rtbitmap block/wordcount computationsrefactor-rtbitmap-macros-6.7_2023-10-19
Create helper functions that compute the number of blocks or words
necessary to store the rt bitmap.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index fdfb22baa6da..8e041df12640 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -998,7 +998,7 @@ xfs_growfs_rt( */ nrextents = nrblocks; do_div(nrextents, in->extsize); - nrbmblocks = howmany_64(nrextents, NBBY * sbp->sb_blocksize); + nrbmblocks = xfs_rtbitmap_blockcount(mp, nrextents); nrextslog = xfs_highbit32(nrextents); nrsumlevels = nrextslog + 1; nrsumsize = (uint)sizeof(xfs_suminfo_t) * nrsumlevels * nrbmblocks; |