cloud-hypervisor/block
Anatol Belski cc96fc14b4 block: qcow: Implement dirty bit support for QCOW2 v3 images
Add support for the dirty bit (bit 0 of incompatible_features) which
indicates the image was not closed cleanly. This improves data
integrity by allowing detection of potentially corrupted images.

On open:
- If dirty bit is already set, log a warning and trigger
  refcount rebuild
- Set the dirty bit and write it to disk immediately
- Sync to ensure persistence before any writes
- Skip dirty bit and refcount rebuild for readonly files

On clean close:
- Clear the dirty bit in the header
- Write it to disk and sync

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2026-01-26 11:24:35 +00:00
..
src block: qcow: Implement dirty bit support for QCOW2 v3 images 2026-01-26 11:24:35 +00:00
Cargo.toml block: qcow: Validate incompatible feature bits 2026-01-23 18:58:56 +00:00