From 019aa528304ca70c979db343e45b43fce4f08cc4 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 24 Mar 2026 17:12:14 +0100 Subject: [PATCH] block: vhd: Remove legacy async_io::DiskFile impl from FixedVhdDiskAsync No remaining consumers after switching to DiskBackend::Next. Signed-off-by: Anatol Belski --- block/src/fixed_vhd_async.rs | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/block/src/fixed_vhd_async.rs b/block/src/fixed_vhd_async.rs index 9b768f80c..699fb2a49 100644 --- a/block/src/fixed_vhd_async.rs +++ b/block/src/fixed_vhd_async.rs @@ -7,9 +7,7 @@ use std::os::unix::io::{AsRawFd, RawFd}; use vmm_sys_util::eventfd::EventFd; -use crate::async_io::{ - AsyncIo, AsyncIoError, AsyncIoResult, BorrowedDiskFd, DiskFile, DiskFileError, DiskFileResult, -}; +use crate::async_io::{AsyncIo, AsyncIoError, AsyncIoResult, BorrowedDiskFd, DiskFileError}; use crate::error::{BlockError, BlockErrorKind, BlockResult, ErrorOp}; use crate::fixed_vhd::FixedVhd; use crate::raw_async::RawFileAsync; @@ -26,31 +24,6 @@ impl FixedVhdDiskAsync { } } -impl DiskFile for FixedVhdDiskAsync { - fn logical_size(&mut self) -> DiskFileResult { - Ok(self.0.logical_size().unwrap()) - } - - fn physical_size(&mut self) -> DiskFileResult { - Ok(self.0.physical_size().unwrap()) - } - - fn new_async_io(&self, ring_depth: u32) -> DiskFileResult> { - Ok(Box::new( - FixedVhdAsync::new( - self.0.as_raw_fd(), - ring_depth, - self.0.logical_size().unwrap(), - ) - .map_err(DiskFileError::NewAsyncIo)?, - ) as Box) - } - - fn fd(&mut self) -> BorrowedDiskFd<'_> { - BorrowedDiskFd::new(self.0.as_raw_fd()) - } -} - impl disk_file::DiskSize for FixedVhdDiskAsync { fn logical_size(&self) -> BlockResult { Ok(self.0.logical_size().unwrap())