Re: [Qemu-devel] [PATCH v2 04/23] block: Connect BlockBackend and DriveInfo

2014-09-16 Thread Markus Armbruster
Benoît Canet writes: >> +DriveInfo *blk_legacy_dinfo(BlockBackend *blk) >> +{ >> +return blk->legacy_dinfo; >> +} >> + >> +/* >> + * Set @blk's DriveInfo to @dinfo, and return it. >> + * @blk must not have a DriveInfo set already. > >> + * No other BlockBackend may have the same DriveInfo set

Re: [Qemu-devel] [PATCH v2 04/23] block: Connect BlockBackend and DriveInfo

2014-09-16 Thread Benoît Canet
> +DriveInfo *blk_legacy_dinfo(BlockBackend *blk) > +{ > +return blk->legacy_dinfo; > +} > + > +/* > + * Set @blk's DriveInfo to @dinfo, and return it. > + * @blk must not have a DriveInfo set already. > + * No other BlockBackend may have the same DriveInfo set. Must we try to assert this ? Th

[Qemu-devel] [PATCH v2 04/23] block: Connect BlockBackend and DriveInfo

2014-09-13 Thread Markus Armbruster
Make the BlockBackend own the DriveInfo. Change blockdev_init() to return the BlockBackend instead of the DriveInfo. Signed-off-by: Markus Armbruster --- block.c | 3 -- block/block-backend.c | 38 blockdev.c| 73 ++