> From: Denis V. Lunev <[email protected]>
> 
> The balloon holds file system space that never carries data, but its
> blocks are allocated, so ext4_trim_all_free() 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 in ext4_trim_fs() and discard its
> unwritten extents that fall into the requested range. The walk goes to
> the end of the extent tree, as fallocate() with FALLOC_FL_KEEP_SIZE can
> leave extents past i_size. Physically adjacent extents are merged into
> [ ... ]
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-153590
> 
> Feature: fs/ext4: fast online shrink support
> Signed-off-by: Denis V. Lunev <[email protected]>

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

-- 
Sashiko AI review ยท 
https://sashiko.vzint.dev/#/patchset/[email protected]?part=2


_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to