block: qcow: Add unified QcowDisk wrapper

Introduce QcowDisk, a unified DiskFile implementation for QCOW2
disk images that handles backend selection at runtime via a
use_io_uring flag, matching the pattern used by FixedVhdDisk.

The wrapper delegates to QcowSync or QcowAsync based on the flag
and includes a compile time guard that returns an error when
io_uring is requested but the feature is not enabled.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
Anatol Belski
2026-04-23 16:40:49 +02:00
committed by Rob Bradford
parent b59501e041
commit 27ee36449c
4 changed files with 191 additions and 2 deletions

View File

@@ -165,7 +165,7 @@ pub struct QcowSync {
}
impl QcowSync {
fn new(
pub(crate) fn new(
metadata: Arc<QcowMetadata>,
data_file: QcowRawFile,
backing_file: Option<Arc<dyn BackingRead>>,