]> www.infradead.org Git - users/hch/xfs.git/commit
xfs: rework the rtalloc fallback handling
authorChristoph Hellwig <hch@lst.de>
Fri, 30 Aug 2024 22:37:10 +0000 (15:37 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Sun, 1 Sep 2024 15:58:19 +0000 (08:58 -0700)
commitfd048a1bb391d0ad50144160c3a490b6b34e0755
treeab457529402f67bdbcc4458d18a555344cba1c59
parenta9f646af4307aca3e9006668264761949d5eb35c
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>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_rtalloc.c