hw: Convert from BlockDriverState to BlockBackend, mostly
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 <armbru@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
Showing
- block/block-backend.c 262 additions, 0 deletionsblock/block-backend.c
- blockdev.c 3 additions, 9 deletionsblockdev.c
- dma-helpers.c 30 additions, 29 deletionsdma-helpers.c
- hw/arm/collie.c 2 additions, 3 deletionshw/arm/collie.c
- hw/arm/gumstix.c 2 additions, 3 deletionshw/arm/gumstix.c
- hw/arm/highbank.c 1 addition, 1 deletionhw/arm/highbank.c
- hw/arm/mainstone.c 1 addition, 1 deletionhw/arm/mainstone.c
- hw/arm/musicpal.c 4 additions, 6 deletionshw/arm/musicpal.c
- hw/arm/nseries.c 1 addition, 2 deletionshw/arm/nseries.c
- hw/arm/omap1.c 1 addition, 1 deletionhw/arm/omap1.c
- hw/arm/omap2.c 1 addition, 1 deletionhw/arm/omap2.c
- hw/arm/omap_sx1.c 2 additions, 3 deletionshw/arm/omap_sx1.c
- hw/arm/pxa2xx.c 2 additions, 2 deletionshw/arm/pxa2xx.c
- hw/arm/realview.c 1 addition, 1 deletionhw/arm/realview.c
- hw/arm/spitz.c 1 addition, 3 deletionshw/arm/spitz.c
- hw/arm/tosa.c 1 addition, 2 deletionshw/arm/tosa.c
- hw/arm/versatilepb.c 1 addition, 2 deletionshw/arm/versatilepb.c
- hw/arm/vexpress.c 1 addition, 2 deletionshw/arm/vexpress.c
- hw/arm/virt.c 1 addition, 1 deletionhw/arm/virt.c
- hw/arm/xilinx_zynq.c 1 addition, 2 deletionshw/arm/xilinx_zynq.c
Loading
Please register or sign in to comment