mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: qcow_sync: impl PhysicalSize for QcowDiskSync
Delegate to QcowRawFile::physical_size() which returns the actual host allocation size of the QCOW2 container file. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
0a7b6b089b
commit
4b731ee771
@@ -284,6 +284,12 @@ impl disk_file::DiskSize for QcowDiskSync {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl disk_file::PhysicalSize for QcowDiskSync {
|
||||||
|
fn physical_size(&self) -> BlockResult<u64> {
|
||||||
|
Ok(self.data_raw_file.physical_size()?)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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