xfs: use shifting and masking when converting rt extents, if possible
authorDarrick J. Wong <djwong@kernel.org>
Mon, 16 Oct 2023 16:40:11 +0000 (09:40 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 17 Oct 2023 23:26:25 +0000 (16:26 -0700)
commitef5a83b7e597038d1c734ddb4bc00638082c2bf1
tree9b5aa12266f11b3748c81079e004f6d5ecfc4640
parent5f57f7309d9ab9d24d50c5707472b1ed8af4eabc
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>
fs/xfs/libxfs/xfs_rtbitmap.h
fs/xfs/libxfs/xfs_sb.c
fs/xfs/xfs_linux.h
fs/xfs/xfs_mount.h
fs/xfs/xfs_rtalloc.c
fs/xfs/xfs_trans.c