[Devel] [PATCH hci-8.1 v11 07/10] dm-qcow2: flag the image for check if reftable relocation fails late
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Mon Nov 9 17:11:15 MSK 2026
> Once relocate_refcount_table() has issued the header write pointing to
> the new reftable, any failure returns -EIO. The header on disk may
> already point to the new reftable even if its own write fails: a short
> write is reported as -ENODATA, and the old reftable position is
> restored only in the cached header page, which a v2 image never
> rewrites on suspend. The new reftable on disk may then be unfilled or
> miss the new refblocks, while refcounts of the new and old reftable
> clusters may not be updated. Refcounts no longer match the header, but
> nothing reports that, so the device can be resumed and the image
> reopened as if it were consistent.
>
> Set md_writeback_error on these paths, so wants_check reports the image
> and resume is refused until it is checked, and log the failure.
>
> 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 <alexander.ivanov at virtuozzo.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261109140143.1408038-2-alexander.ivanov@virtuozzo.com?part=7
More information about the Devel
mailing list