Skip to content
Commit 9d4ca5af authored by Chandan Babu R's avatar Chandan Babu R
Browse files

Merge tag 'refactor-rt-unit-conversions-6.7_2023-10-19' of...

Merge tag 'refactor-rt-unit-conversions-6.7_2023-10-19' of https://git.kernel.org/pub/scm/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: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarChandan 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
parents 3ef52c01 ef5a83b7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment