diff options
| author | Darrick J. Wong <[email protected]> | 2023-10-16 16:40:11 +0000 |
|---|---|---|
| committer | Darrick J. Wong <[email protected]> | 2023-10-17 23:26:25 +0000 |
| commit | ef5a83b7e597038d1c734ddb4bc00638082c2bf1 (patch) | |
| tree | 9b5aa12266f11b3748c81079e004f6d5ecfc4640 /fs/xfs/xfs_rtalloc.c | |
| parent | xfs: create rt extent rounding helpers for realtime extent blocks (diff) | |
| download | kernel-ef5a83b7e597038d1c734ddb4bc00638082c2bf1.tar.gz kernel-ef5a83b7e597038d1c734ddb4bc00638082c2bf1.zip | |
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 <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
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; |
