block: raw: Rename RawFileAsync to RawAsync

Apply the consistent <Format><Backend> naming convention.

No functional change.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
Anatol Belski
2026-04-24 17:31:03 +02:00
committed by Rob Bradford
parent 6279214dff
commit ac3c53cebb
3 changed files with 9 additions and 12 deletions

View File

@@ -10,16 +10,16 @@ use vmm_sys_util::eventfd::EventFd;
use crate::async_io::{AsyncIo, AsyncIoCompletion, AsyncIoError, AsyncIoOperation, AsyncIoResult};
use crate::error::BlockResult;
use crate::raw_async::RawFileAsync;
use crate::raw_async::RawAsync;
pub struct FixedVhdAsync {
raw_file_async: RawFileAsync,
raw_file_async: RawAsync,
size: u64,
}
impl FixedVhdAsync {
pub fn new(fd: RawFd, ring_depth: u32, size: u64) -> BlockResult<Self> {
let raw_file_async = RawFileAsync::new(fd, ring_depth)?;
let raw_file_async = RawAsync::new(fd, ring_depth)?;
Ok(FixedVhdAsync {
raw_file_async,

View File

@@ -16,20 +16,20 @@ use crate::error::{BlockError, BlockErrorKind, BlockResult};
use crate::sparse::{blkdiscard, blkzeroout};
use crate::{SECTOR_SIZE, is_block_device};
pub struct RawFileAsync {
pub struct RawAsync {
fd: RawFd,
data_io: UringDataIo,
alignment: u64,
is_block_device: bool,
}
impl RawFileAsync {
impl RawAsync {
pub fn new(fd: RawFd, ring_depth: u32) -> BlockResult<Self> {
let data_io =
UringDataIo::new(ring_depth).map_err(|e| BlockError::new(BlockErrorKind::Io, e))?;
let is_block_device = is_block_device(fd);
Ok(RawFileAsync {
Ok(RawAsync {
fd,
data_io,
alignment: SECTOR_SIZE,
@@ -38,7 +38,7 @@ impl RawFileAsync {
}
}
impl AsyncIo for RawFileAsync {
impl AsyncIo for RawAsync {
fn notifier(&self) -> &EventFd {
self.data_io.notifier()
}

View File

@@ -12,7 +12,7 @@ use log::warn;
use crate::async_io::{AsyncIo, BorrowedDiskFd, DiskFileError};
use crate::error::{BlockError, BlockErrorKind, BlockResult};
#[cfg(feature = "io_uring")]
use crate::raw_async::RawFileAsync;
use crate::raw_async::RawAsync;
use crate::raw_async_aio::RawFileAsyncAio;
use crate::raw_sync::RawSync;
use crate::{DiskTopology, disk_file, probe_sparse_support, query_device_size};
@@ -131,10 +131,7 @@ impl disk_file::AsyncDiskFile for RawDisk {
match self.backend {
RawBackend::Sync => Ok(Box::new(RawSync::new(self.file.as_raw_fd()))),
#[cfg(feature = "io_uring")]
RawBackend::IoUring => Ok(Box::new(RawFileAsync::new(
self.file.as_raw_fd(),
ring_depth,
)?)),
RawBackend::IoUring => Ok(Box::new(RawAsync::new(self.file.as_raw_fd(), ring_depth)?)),
RawBackend::Aio => Ok(Box::new(RawFileAsyncAio::new(
self.file.as_raw_fd(),
ring_depth,