[Devel] [PATCH hci-8.1 v3 2/5] ms/xfs: don't skip free extents of the longest length in a whole-AG FITRIM

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Wed Nov 11 14:35:15 MSK 2026


> From: Daejun Park <daejun7.park at samsung.com>
> 
> Since commit a66d636385d6 ("xfs: fix fstrim offset calculations"), the
> by-length walk of an AG in FITRIM starts with
> xfs_alloc_lookup_ge(cur, 0, pagf_longest) and walks down. The lookup
> lands on the longest free extent with the lowest block number. The
> other free extents of that length sort after it and are never
> discarded.
> 
> Start every by-length batch with xfs_alloc_lookup_le() at restart_bno.
> 
> Suggested-by: Dave Chinner <dgc at kernel.org>
> Link: https://lore.kernel.org/r/ZgiJWxVcVwag0fIP@dread.disaster.area
> Cc: stable at vger.kernel.org
> Fixes: a66d636385d6 ("xfs: fix fstrim offset calculations")
> Signed-off-by: Daejun Park <daejun7.park at samsung.com>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
> Signed-off-by: Carlos Maiolino <cem at kernel.org>
> (cherry picked from commit 5745f4f10a1a16aa5bb020acc38afa33f2d5ff99)
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-153590
> 
> Feature: fix ms/xfs
> Signed-off-by: Denis V. Lunev <den at openvz.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261111113135.4023555-1-den@openvz.org?part=2




More information about the Devel mailing list