[Devel] [PATCH hci-8.2 3/4] dm-qcow2: delay a backing-file COW while its L2 entry awaits writeback

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Thu Nov 19 04:16:21 MSK 2026


> From: Denis V. Lunev <den at openvz.org>
> 
> On an ext_l2 image with a backing file, a write that covers part of an
> unallocated subcluster is a backing-file COW. Writes are not delayed on
> a dirty L2 entry, so such a write can follow, in the same worker pass,
> the write that allocated its cluster. It finds the cluster in memory,
> keeps it (only_set_ext_l2) and computes the new subcluster bitmap from
> the dirty entry, but does not join the writeback of that entry. If the
> writeback fails, the revert sets the entry back to offset 0, and the
> COW then installs its bitmap over it and completes. Its data went to a
> cluster that nothing maps, and later I/O to those subclusters goes to
> cluster 0, where the image header lives.
> 
> Delay the COW while its L2 entry or the subcluster bitmap is dirty, as
> prepare_cluster_discard() does. Only a write that partly covers a
> subcluster of a cluster allocated in the same worker pass waits longer.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-154310
> 
> Fixes: 222b6f1291c1 ("dm-qcow2: Introduce driver to create block devices over QCOW2 files")
> Feature: dm-qcow2: block device over QCOW2 files driver
> Signed-off-by: Denis V. Lunev <den at openvz.org>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>

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




More information about the Devel mailing list