mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
QCOW metadata published a fully deallocated cluster before the caller performed the host punch-hole. Under multi-queue load, a concurrent metadata flush could make the cluster allocatable, and another queue could reuse it before the delayed punch ran. If reused as an L2 table, the stale punch erased live metadata and made guest data unreachable. This was observed in production as confirmed guest data loss, with allocated guest clusters becoming refcounted but unreachable from the QCOW mapping. Keep punch-pending clusters out of both free lists. Publish a cluster only after the host punch succeeds, so another metadata flush is required before reuse. Add deterministic coverage for the cross-queue schedule and for host operation failures. Signed-off-by: doge <me@crackerben.com>