Hi all, This series replaces all the open-coded integer division and multiplication conversions between rt blocks and rt extents with calls to static inline helpers. Having cleaned all that up, the helpers are augmented to skip the expensive operations in favor of bit shifts and masking if the rt extent size is a power of two. If you're going to start using this mess, you probably ought to just pull from my git trees, which are linked below. This is an extraordinary way to destroy everything. Enjoy! Comments and questions are, as always, welcome. --D kernel git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=refactor-rt-unit-conversions xfsprogs git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=refactor-rt-unit-conversions --- fs/xfs/libxfs/xfs_bmap.c | 19 +++----- fs/xfs/libxfs/xfs_rtbitmap.c | 4 +- fs/xfs/libxfs/xfs_rtbitmap.h | 88 +++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_sb.c | 2 + fs/xfs/libxfs/xfs_swapext.c | 7 ++- fs/xfs/libxfs/xfs_trans_inode.c | 3 + fs/xfs/libxfs/xfs_trans_resv.c | 3 + fs/xfs/scrub/inode.c | 3 + fs/xfs/scrub/inode_repair.c | 3 + fs/xfs/scrub/rtbitmap.c | 18 +++----- fs/xfs/scrub/rtsummary.c | 4 +- fs/xfs/xfs_bmap_util.c | 38 +++++++---------- fs/xfs/xfs_fsmap.c | 12 +++-- fs/xfs/xfs_ioctl.c | 5 +- fs/xfs/xfs_linux.h | 12 +++++ fs/xfs/xfs_mount.h | 2 + fs/xfs/xfs_rtalloc.c | 16 ++++--- fs/xfs/xfs_super.c | 3 + fs/xfs/xfs_trans.c | 9 +++- fs/xfs/xfs_xchgrange.c | 4 +- 20 files changed, 178 insertions(+), 77 deletions(-)