From 554562fef24d49cfab2dccee5e163c8da5bb5e7d Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 12 Mar 2026 21:06:48 +0100 Subject: [PATCH] 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 --- block/src/qcow_sync.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/block/src/qcow_sync.rs b/block/src/qcow_sync.rs index 56c19307f..c75e895e8 100644 --- a/block/src/qcow_sync.rs +++ b/block/src/qcow_sync.rs @@ -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, data_file: QcowRawFile,