[Devel] [PATCH hci-8.1 v3 5/5] xfs: discard the balloon on FITRIM

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Wed Nov 11 14:40:02 MSK 2026


> From: Denis V. Lunev <den at openvz.org>
> 
> The balloon holds file system space that never carries data, but its
> blocks are allocated, so the free space walk of xfs_ioc_trim() never
> discards them, and inflating the balloon is a plain fallocate() that
> does not discard either. Once the balloon is inflated over blocks that
> held data, e.g. on an online shrink after files were removed, the
> device below keeps them allocated: a ploop or qcow2 image keeps host
> disk space the container can never use, and compaction, which is
> FITRIM, does not give it back.
> 
> Walk the balloon after the free space of the data device and discard
> its unwritten extents that fall into the requested range, merging
> physically adjacent ones into one discard. The walk goes to the end of
> the file offset space, as fallocate() with FALLOC_FL_KEEP_SIZE can
> [ ... ]
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-153590
> 
> Feature: fs/xfs: fast online shrink support
> 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=5




More information about the Devel mailing list