Am 07.10.2014 um 13:59 hat Markus Armbruster geschrieben: > Device models should access their block backends only through the > block-backend.h API. Convert them, and drop direct includes of > inappropriate headers. > > Just four uses of BlockDriverState are left: > > * The Xen paravirtual block device backend (xen_disk.c) opens images > itself when set up via xenbus, bypassing blockdev.c. I figure it > should go through qmp_blockdev_add() instead. > > * Device model "usb-storage" prompts for keys. No other device model > does, and this one probably shouldn't do it, either. > > * ide_issue_trim_cb() uses bdrv_aio_discard() instead of > blk_aio_discard() because it fishes its backend out of a BlockAIOCB, > which has only the BlockDriverState. > > * PC87312State has an unused BlockDriverState[] member. > > The next two commits take care of the latter two. > > Signed-off-by: Markus Armbruster <arm...@redhat.com>
> diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h > index 198da2e..8b3f352 100644 > --- a/include/qemu/typedefs.h > +++ b/include/qemu/typedefs.h > @@ -37,6 +37,7 @@ typedef struct HCIInfo HCIInfo; > typedef struct AudioState AudioState; > typedef struct BlockBackend BlockBackend; > typedef struct BlockDriverState BlockDriverState; > +typedef struct BlockBackend BlockBackend; > typedef struct DriveInfo DriveInfo; > typedef struct DisplayState DisplayState; > typedef struct DisplayChangeListener DisplayChangeListener; This is a duplicate typedef (the first definition is even in the context of this hunk) and causes the build to fail on RHEL 6. I can drop the hunk while applying if you don't object. Kevin