From: Christoph Hellwig Date: Mon, 18 Dec 2023 04:57:17 +0000 (+0100) Subject: xfs: consider minlen sized extents in xfs_rtallocate_extent_block X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=944df75958807d56f2db9fdc769eb15dd9f0366a;p=linux.git xfs: consider minlen sized extents in xfs_rtallocate_extent_block minlen is the lower bound on the extent length that the caller can accept, and maxlen is at this point the maximal available length. This means a minlen extent is perfectly fine to use, so do it. This matches the equivalent logic in xfs_rtallocate_extent_exact that also accepts a minlen sized extent. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R --- diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 0c9893b9f2a99..b5b596cf043af 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -309,7 +309,7 @@ xfs_rtallocate_extent_block( /* * Searched the whole thing & didn't find a maxlen free extent. */ - if (minlen < maxlen && besti != -1) { + if (minlen <= maxlen && besti != -1) { xfs_rtxlen_t p; /* amount to trim length by */ /*