[Devel] [PATCH hci-8.1 1/3] dm-qcow2: count in-flight data writes per L2 page
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Thu Nov 12 14:22:37 MSK 2026
> A discard, which frees a cluster, has to know when data writes
> submitted to the cluster earlier are completed. Nothing tracks them
> now: a write goes from perform_rw_mapped() straight to the image file
> and is not linked to anything a discard could wait for.
>
> Count every data write submitted from perform_rw_mapped() in the L2
> page mapping its cluster, from submission till completion. The counter
> is split in two generations and a write is counted in the current one.
> This allows the next patch to switch the generation and to wait for the
> previous one to drain without being starved by new writes.
>
> The counting is done from the main work only, so the generation is
> stable there and no lock is needed.
>
> No functional change: nobody switches the generation or waits for the
> counters yet.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-154659
> Feature: dm-qcow2: block device over QCOW2 files driver
> Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261112111205.736027-1-andrey.zhadchenko@virtuozzo.com?part=1
More information about the Devel
mailing list