block_util: Simplify RAW synchronous implementation

Using directly preadv and pwritev, we can simply use a RawFd instead of
a file, and we don't need to use the more complex implementation from
the qcow crate.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2021-01-28 17:29:33 +01:00
committed by Rob Bradford
parent b2e5dbaecb
commit c6854c5a97
4 changed files with 64 additions and 47 deletions
+1 -1
View File
@@ -1686,7 +1686,7 @@ impl DeviceManager {
Box::new(RawFileDisk::new(file)) as Box<dyn DiskFile>
} else {
info!("Using synchronous RAW disk file");
Box::new(RawFileDiskSync::new(file, disk_cfg.direct)) as Box<dyn DiskFile>
Box::new(RawFileDiskSync::new(file)) as Box<dyn DiskFile>
}
}
ImageType::Qcow2 => {