diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-10-16 19:40:11 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-10-18 02:26:25 +0300 |
commit | ef5a83b7e597038d1c734ddb4bc00638082c2bf1 (patch) | |
tree | 9b5aa12266f11b3748c81079e004f6d5ecfc4640 /fs/xfs/xfs_rtalloc.c | |
parent | 5f57f7309d9ab9d24d50c5707472b1ed8af4eabc (diff) | |
download | linux-ef5a83b7e597038d1c734ddb4bc00638082c2bf1.tar.xz |
xfs: use shifting and masking when converting rt extents, if possible
Avoid the costs of integer division (32-bit and 64-bit) if the realtime
extent size is a power of two.
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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index ac7c269ad547..e5a3200cea72 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -1054,6 +1054,7 @@ xfs_growfs_rt( * Calculate new sb and mount fields for this round. */ nsbp->sb_rextsize = in->extsize; + nmp->m_rtxblklog = -1; /* don't use shift or masking */ nsbp->sb_rbmblocks = bmbno + 1; nrblocks_step = (bmbno + 1) * NBBY * nsbp->sb_blocksize * nsbp->sb_rextsize; |