cloud-hypervisor/virtio-devices
Anatol Belski 46e6ecddfe block: Add supports_zero_flag trait method
Add supports_zero_flag() to DiskFile trait to indicate whether a disk
format can mark clusters/blocks as reading zeros without deallocating
storage.

QCOW2 supports this via the zero flag in L2 entries. VHDX also has
PAYLOAD_BLOCK_ZERO state for this, though it's not yet implemented in
cloud-hypervisor.

This enables DISCARD to be advertised even with sparse=false for formats
with zero-flag support, since they can mark regions as zeros (keeps
storage allocated) instead of requiring full deallocation.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2026-02-13 18:44:30 +00:00
..
src block: Add supports_zero_flag trait method 2026-02-13 18:44:30 +00:00
build.rs build: Add "fuzzing" as a valid cfg(..) attribute 2024-05-08 08:10:28 +00:00
Cargo.toml misc: improve developer experience of cargo clippy 2025-11-17 16:59:49 +00:00