mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
committed by
Rob Bradford
parent
63f5e6e97f
commit
554562fef2
@@ -298,6 +298,16 @@ impl disk_file::DiskFd for QcowDiskSync {
|
|||||||
|
|
||||||
impl disk_file::Geometry 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 {
|
pub struct QcowSync {
|
||||||
metadata: Arc<QcowMetadata>,
|
metadata: Arc<QcowMetadata>,
|
||||||
data_file: QcowRawFile,
|
data_file: QcowRawFile,
|
||||||
|
|||||||
Reference in New Issue
Block a user