On Tue, Feb 18, 2025 at 07:20:17PM +0100, Kevin Wolf wrote:
> +/// A request to a block driver
> +pub enum Request {
> +Read { offset: u64, len: u64 },
> +}
> +
> +/// The target for a number of guest blocks, e.g. a location in a child node
> or the information
> +/// that the described blocks
On Tue, Feb 18, 2025 at 07:20:17PM +0100, Kevin Wolf wrote:
> This adds a map() function to the BlockDriver trait and makes use of it
> to implement reading from an image.
>
> Signed-off-by: Kevin Wolf
> ---
> rust/block/src/driver.rs | 95
> 1 file chang
Il mer 19 feb 2025, 14:02 Kevin Wolf ha scritto:
> > Likewise, even BochsImage should not need a standard Rust Arc.
> > However you need to add your own block::Arc and map
> Clone/Drop to
> > bdrv_ref/bdrv_unref. Then BochsImage can use block::Arc; this
> > makes it even clearer that Mapping sho
Am 19.02.2025 um 07:11 hat Paolo Bonzini geschrieben:
> On 2/18/25 19:20, Kevin Wolf wrote:
> > +/// The described blocks are stored in a child node.
> > +Data {
> > +/// Child node in which the data is stored
> > +node: Arc,
>
> Having Arc<> here shouldn't be necessary, si
On 2/18/25 19:20, Kevin Wolf wrote:
+/// The described blocks are stored in a child node.
+Data {
+/// Child node in which the data is stored
+node: Arc,
Having Arc<> here shouldn't be necessary, since the BdrvChild is already
reference counted. Since the code is calle
This adds a map() function to the BlockDriver trait and makes use of it
to implement reading from an image.
Signed-off-by: Kevin Wolf
---
rust/block/src/driver.rs | 95
1 file changed, 95 insertions(+)
diff --git a/rust/block/src/driver.rs b/rust/block/s