]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: retry allocations when locality-based search fails
authorDarrick J. Wong <djwong@kernel.org>
Sun, 9 May 2021 23:22:55 +0000 (16:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 20 May 2021 15:28:34 +0000 (08:28 -0700)
commit3bca6f38c7851b765c2f5921acf56e96a66bdda3
tree975e58f1184d64945983a3f883a78bb28ab6e612
parentae11fe3854eb182dc5cffae6015c28897d45fa83
xfs: retry allocations when locality-based search fails

If a realtime allocation fails because we can't find a sufficiently
large free extent satisfying locality rules, relax the locality rules
and try again.  This reduces the occurrence of short writes to realtime
files when the write size is large and the free space is fragmented.

This was originally discovered by running generic/186 with the realtime
reflink patchset and a 128k cow extent size hint, but the short write
symptoms can manifest with a 128k extent size hint and no reflink, so
apply the fix now.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
fs/xfs/xfs_bmap_util.c