Commit 944df759 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Chandan Babu R

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
parent b5785f61
...@@ -309,7 +309,7 @@ xfs_rtallocate_extent_block( ...@@ -309,7 +309,7 @@ xfs_rtallocate_extent_block(
/* /*
* Searched the whole thing & didn't find a maxlen free extent. * 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 */ xfs_rtxlen_t p; /* amount to trim length by */
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment