]> www.infradead.org Git - users/hch/xfs.git/commit
xfs: rework the rtalloc fallback handling
authorChristoph Hellwig <hch@lst.de>
Wed, 31 Jul 2024 19:37:18 +0000 (12:37 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 31 Jul 2024 23:30:52 +0000 (16:30 -0700)
commitad03480e77df2df59870475d147d92df7f9c7aa0
tree6d47de67b396cee571a4e7e47ccd8edecf5d891f
parentce43c88fda78a1bba4482a6da9de48b185990d2f
xfs: rework the rtalloc fallback handling

xfs_rtallocate currently has two fallbacks, when an allocation fails:

 1) drop the requested extent size alignment, if any, and retry
 2) ignore the locality hint

Oddly enough it does those in order, as trying a different location
is more in line with what the user asked for, and does it in a very
unstructured way.

Lift the fallback to try to allocate without the locality hint into
xfs_rtallocate to both perform them in a more sensible order and to
clean up the code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_rtalloc.c