> From: Denis V. Lunev <[email protected]>
> 
> relocate_refcount_table() puts the new reftable at pos, the start of
> the first refcount group the old table does not cover, and the new
> refblocks right after it. It then gives each new refblock to the group
> the refblock itself sits in. When the new reftable fills the group of
> pos by itself, the refblocks all land in the next group, and the group
> of pos gets none. Marking the reftable clusters used then fails with a
> WARN, and every allocating write past the old refcount coverage fails
> with EIO.
> 
> A valid image gets there: with 4K clusters and refcount_bits=64 a
> refcount group is 512 clusters, and the reftable reaches 512 clusters
> when the image file grows to about 511G; with refcount_bits=32, at
> about 2T.
> 
> Give the new refblocks to the groups the new reftable and refblocks
> span, one each, in order. pos is group-aligned, and r2_clus is computed
> for the refblocks to count both themselves and the new table, so there
> is a refblock for each of these groups.
> 
> Fixes: 222b6f1291c1 ("dm-qcow2: Introduce driver to create block devices over 
> QCOW2 files")
> Reported-by: Konstantin Khorenko <[email protected]>
> https://virtuozzo.atlassian.net/browse/VSTOR-153421
> Feature: dm-qcow2: block device over QCOW2 files driver
> 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=5


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

Reply via email to