[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
- [PATCH v2 08/11] rust/block: Add driver module, (continued)
- [PATCH v2 03/11] rust: Add some block layer bindings, Kevin Wolf, 2025/02/18
- [PATCH v2 07/11] block: Add bdrv_open_blockdev_ref_file(), Kevin Wolf, 2025/02/18
- [PATCH v2 11/11] rust/block: Add format probing, Kevin Wolf, 2025/02/18
- [PATCH v2 10/11] bochs-rs: Add bochs block driver reimplementation in Rust, Kevin Wolf, 2025/02/18
- Re: [PATCH v2 10/11] bochs-rs: Add bochs block driver reimplementation in Rust,
Zhao Liu <=