block: qcow_sync: impl SparseCapable for QcowDiskSync

Advertise support for sparse operations and the zero flag. QCOW2
inherently supports both through cluster deallocation.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
Anatol Belski
2026-03-12 21:06:48 +01:00
committed by Rob Bradford
parent 63f5e6e97f
commit 554562fef2

View File

@@ -298,6 +298,16 @@ impl disk_file::DiskFd for QcowDiskSync {
impl disk_file::Geometry for QcowDiskSync {}
impl disk_file::SparseCapable for QcowDiskSync {
fn supports_sparse_operations(&self) -> bool {
true
}
fn supports_zero_flag(&self) -> bool {
true
}
}
pub struct QcowSync {
metadata: Arc<QcowMetadata>,
data_file: QcowRawFile,