[Devel] [PATCH hci-8.1 2/2] dm-qcow2: fix a merge reporting success after a failed write

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Wed Oct 28 16:25:07 MSK 2026


> From: Denis V. Lunev <den at openvz.org>
> 
> qcow2_service_iter() collects the status of its service qios in a
> function-local static shared by every dm-qcow2 device, and resets it
> to OK when it starts. A merge or L1 COW break starting on one device
> while another one runs wipes the error the other one recorded. That
> one then finishes and reports success although a qio failed, so
> userspace may complete the merge and drop the top image, losing data
> that never reached the lower image.
> 
> Keep the status on the stack. The qios carry a pointer to it, so the
> function must not return while one of them is outstanding: every exit
> already waits for service_qios to drain.
> 
> Fixes: 222b6f1291c1 ("dm-qcow2: Introduce driver to create block devices over QCOW2 files")
> 
> Signed-off-by: Denis V. Lunev <den at openvz.org>

Sashiko has reviewed this patch and found no issues. It looks great!

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




More information about the Devel mailing list