mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: vhd: impl DiskSize for FixedVhdDiskAsync
Delegate to infallible FixedVhd::logical_size(). Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
@@ -13,8 +13,9 @@ use crate::async_io::{
|
||||
use crate::error::{BlockError, BlockResult, ErrorOp};
|
||||
use crate::fixed_vhd::FixedVhd;
|
||||
use crate::raw_async::RawFileAsync;
|
||||
use crate::{BatchRequest, BlockBackend};
|
||||
use crate::{BatchRequest, BlockBackend, disk_file};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct FixedVhdDiskAsync(FixedVhd);
|
||||
|
||||
impl FixedVhdDiskAsync {
|
||||
@@ -50,6 +51,12 @@ impl DiskFile for FixedVhdDiskAsync {
|
||||
}
|
||||
}
|
||||
|
||||
impl disk_file::DiskSize for FixedVhdDiskAsync {
|
||||
fn logical_size(&self) -> BlockResult<u64> {
|
||||
Ok(self.0.logical_size().unwrap())
|
||||
}
|
||||
}
|
||||
|
||||
pub struct FixedVhdAsync {
|
||||
raw_file_async: RawFileAsync,
|
||||
size: u64,
|
||||
|
||||
Reference in New Issue
Block a user