> place_r2() links a new refblock into R1, but moves neither file_size > nor file_preallocated_area_start. The refblock stays at or above the > watermark if truncate_prealloc_safe() in allocate_cluster() fails > after place_r2(), or if a parallel mark_cluster_unused() lowers > free_cluster_search_pos before the second pass of > find_unused_cluster(). Truncation of preallocations on suspend then > cuts the file under the refblock: R1 on disk points past EOF, and > the next session gets -EIO on allocations in the range it covers. > > Make find_unused_cluster() report a position not covered by R2 > instead of placing the refblock there itself. allocate_cluster() > prepares that cluster the same way as a data cluster, with the punch, > extend and watermark update moved into prepare_unused_cluster(), and > calls place_r2() before searching again. > > https://virtuozzo.atlassian.net/browse/VSTOR-148171 > Feature: dm-qcow2: block device over QCOW2 files driver > Fixes: 222b6f1291c1c ("dm-qcow2: Introduce driver to create block devices > over QCOW2 files") > > Signed-off-by: Alexander Ivanov <[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=3 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
