Merge tag 'refactor-rt-unit-conversions-6.7_2023-10-19' of https://git.kernel.org...
authorChandan Babu R <chandanbabu@kernel.org>
Mon, 23 Oct 2023 05:15:10 +0000 (10:45 +0530)
committerChandan Babu R <chandanbabu@kernel.org>
Mon, 23 Oct 2023 05:15:10 +0000 (10:45 +0530)
commit9d4ca5afa604d35c2e9caba0982a53ffe0fa4469
treed06c1cdeede56f2cadd046dfb24135ceec7712fa
parent3ef52c010973e3fae53b1a9eabc156a79b01cd8c
parentef5a83b7e597038d1c734ddb4bc00638082c2bf1
Merge tag 'refactor-rt-unit-conversions-6.7_2023-10-19' of https://git./linux/kernel/git/djwong/xfs-linux into xfs-6.7-mergeA

xfs: refactor rt extent unit conversions [v1.1]

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.

v1.1: various cleanups suggested by hch

With a bit of luck, this should all go splendidly.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
* tag 'refactor-rt-unit-conversions-6.7_2023-10-19' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
  xfs: use shifting and masking when converting rt extents, if possible
  xfs: create rt extent rounding helpers for realtime extent blocks
  xfs: convert do_div calls to xfs_rtb_to_rtx helper calls
  xfs: create helpers to convert rt block numbers to rt extent numbers
  xfs: create a helper to convert extlen to rtextlen
  xfs: create a helper to compute leftovers of realtime extents
  xfs: create a helper to convert rtextents to rtblocks