mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: qcow: Thread sparse configuration to QCOW2 constructors
Add sparse parameter to QcowFile constructors and propagate it from device_manager through QcowDiskSync. This makes the sparse configuration available throughout the QCOW2 implementation for controlling allocation and deallocation behavior. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
46e6ecddfe
commit
0a287793df
@@ -2724,8 +2724,13 @@ impl DeviceManager {
|
||||
ImageType::Qcow2 => {
|
||||
info!("Using synchronous QCOW2 disk file");
|
||||
Box::new(
|
||||
QcowDiskSync::new(file, disk_cfg.direct, disk_cfg.backing_files)
|
||||
.map_err(DeviceManagerError::CreateQcowDiskSync)?,
|
||||
QcowDiskSync::new(
|
||||
file,
|
||||
disk_cfg.direct,
|
||||
disk_cfg.backing_files,
|
||||
disk_cfg.sparse,
|
||||
)
|
||||
.map_err(DeviceManagerError::CreateQcowDiskSync)?,
|
||||
) as Box<dyn DiskFile>
|
||||
}
|
||||
ImageType::Vhdx => {
|
||||
|
||||
Reference in New Issue
Block a user