block: Use RawDisk in factory, remove old wrappers

Update open_raw to construct RawDisk instead of choosing between
RawFileDisk, RawFileDiskSync and RawFileDiskAio. The backend decision
is now made inside RawDisk::create_async_io.

Remove the DiskFile wrapper structs from raw_sync.rs, raw_async.rs
and raw_async_aio.rs. Only the AsyncIo worker structs remain in those
files. Reduce their module visibility to pub(crate).

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
Anatol Belski
2026-04-23 13:15:52 +02:00
committed by Bo Chen
parent 556cb6be46
commit 701767e5be
5 changed files with 17 additions and 278 deletions

View File

@@ -24,15 +24,12 @@ pub mod qcow_async;
pub(crate) mod qcow_common;
pub mod qcow_sync;
#[cfg(feature = "io_uring")]
/// Async primitives based on `io-uring`
///
/// Enabled with the `"io_uring"` feature
pub mod raw_async;
pub mod raw_async_aio;
pub(crate) mod raw_async;
pub(crate) mod raw_async_aio;
#[cfg(test)]
mod raw_async_io_tests;
pub mod raw_disk;
pub mod raw_sync;
pub(crate) mod raw_sync;
mod request;
pub mod vhd;
pub mod vhdx;