xfs: fixes for the realtime allocator [v4.2 4/8]

While I was reviewing how to integrate realtime allocation groups with
 the rt allocator, I noticed several bugs in the existing allocation code
 with regards to calculating the maximum range of rtx to scan for free
 space.  This series fixes those range bugs and cleans up a few things
 too.
 
 I also added a few cleanups from Christoph.
 
 With a bit of luck, this should all go splendidly.
 
 Signed-off-by: Darrick J. Wong <djwong@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ2qTKExjcn+O1o2YRKO3ySh0YRpgUCZtX/YwAKCRBKO3ySh0YR
 pmXZAQD5t79H7c1Za2WkLlOMLOdBNKZU5Rfbr3ZFXZDJ22pWewEAoFa3+8vH5o6i
 P3c9yP/H4+FfA4ZgMGIg/eS/2NvX1QQ=
 =n6pm
 -----END PGP SIGNATURE-----

Merge tag 'rtalloc-fixes-6.12_2024-09-02' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.12-mergeA

xfs: fixes for the realtime allocator [v4.2 4/8]

While I was reviewing how to integrate realtime allocation groups with
the rt allocator, I noticed several bugs in the existing allocation code
with regards to calculating the maximum range of rtx to scan for free
space.  This series fixes those range bugs and cleans up a few things
too.

I also added a few cleanups from Christoph.

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 'rtalloc-fixes-6.12_2024-09-02' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
  xfs: simplify xfs_rtalloc_query_range
  xfs: remove xfs_rtb_to_rtxrem
  xfs: fix broken variable-sized allocation detection in xfs_rtallocate_extent_block
  xfs: reduce excessive clamping of maxlen in xfs_rtallocate_extent_near
  xfs: clean up xfs_rtallocate_extent_exact a bit
  xfs: refactor aligning bestlen to prod
  xfs: don't scan off the end of the rt volume in xfs_rtallocate_extent_block
  xfs: don't return too-short extents from xfs_rtallocate_extent_block
  xfs: ensure rtx mask/shift are correct after growfs
  xfs: use the recalculated transaction reservation in xfs_growfs_rt_bmblock
This commit is contained in:
Chandan Babu R 2024-09-03 09:13:51 +05:30
commit b2138a591c
7 changed files with 124 additions and 133 deletions