qemu-rust
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 10/11] bochs-rs: Add bochs block driver reimplementation i


From: Zhao Liu
Subject: Re: [PATCH v2 10/11] bochs-rs: Add bochs block driver reimplementation in Rust
Date: Thu, 20 Feb 2025 15:02:59 +0800

> +use crate::driver::{block_driver, BdrvChild, BlockDriver, Mapping, 
> MappingTarget, Request};
> +use crate::SizedIoBuffer;
> +use qemu_api::bindings;

it's better to list all items from bindings here, which helps in understanding
which parts will need a wrapper added later.

> +use qemu_api::errno::Errno;
> +use qemu_api::futures::qemu_run_future;
> +use std::cmp::min;
> +use std::io::{self, Error, ErrorKind};
> +use std::mem::MaybeUninit;
> +use std::ptr;
> +use std::sync::Arc;

nit: we can fix style by "cargo +nightly fmt" with latest toolchain.

> +impl BlockDriver for BochsImage {

...

> +    async fn map(&self, req: &Request) -> io::Result<Mapping> {

v1.63 doesn't support async fn in trait, do we have to involve
async_trait crate?

Regards,
Zhao




reply via email to

[Prev in Thread] Current Thread [Next in Thread]