Create a QCOW2 image with `num_clusters` allocated clusters opened via QcowDisk with io_uring backend.
(num_clusters: usize)
| 68 | /// Create a QCOW2 image with `num_clusters` allocated clusters opened |
| 69 | /// via QcowDisk with io_uring backend. |
| 70 | pub fn qcow_async_tempfile(num_clusters: usize) -> (TempFile, QcowDisk) { |
| 71 | let tmp = create_qcow_tempfile(num_clusters); |
| 72 | let disk = QcowDisk::new(tmp.as_file().try_clone().unwrap(), false, false, true, true) |
| 73 | .expect("failed to open QCOW2 via QcowDisk"); |
| 74 | (tmp, disk) |
| 75 | } |
| 76 | |
| 77 | /// Drain `count` completions from a synchronous async_io backend. |
| 78 | pub fn drain_completions(async_io: &mut dyn AsyncIo, count: usize) { |
no test coverage detected