]> git.proxmox.com Git - mirror_qemu.git/commit - blockdev.c
hw: Convert from BlockDriverState to BlockBackend, mostly
authorMarkus Armbruster <armbru@redhat.com>
Tue, 7 Oct 2014 11:59:18 +0000 (13:59 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 20 Oct 2014 12:02:25 +0000 (14:02 +0200)
commit4be746345f13e99e468c60acbd3a355e8183e3ce
tree16509218f940129beb113cf3b1be158c3501ec1d
parent2a30307f709e6a395d23cf94837e9aae15f8e8fa
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>
110 files changed:
block/block-backend.c
blockdev.c
dma-helpers.c
hw/arm/collie.c
hw/arm/gumstix.c
hw/arm/highbank.c
hw/arm/mainstone.c
hw/arm/musicpal.c
hw/arm/nseries.c
hw/arm/omap1.c
hw/arm/omap2.c
hw/arm/omap_sx1.c
hw/arm/pxa2xx.c
hw/arm/realview.c
hw/arm/spitz.c
hw/arm/tosa.c
hw/arm/versatilepb.c
hw/arm/vexpress.c
hw/arm/virt.c
hw/arm/xilinx_zynq.c
hw/arm/z2.c
hw/block/block.c
hw/block/dataplane/virtio-blk.c
hw/block/fdc.c
hw/block/hd-geometry.c
hw/block/m25p80.c
hw/block/nand.c
hw/block/nvme.c
hw/block/onenand.c
hw/block/pflash_cfi01.c
hw/block/pflash_cfi02.c
hw/block/virtio-blk.c
hw/block/xen_disk.c
hw/core/qdev-properties-system.c
hw/core/qdev-properties.c
hw/cris/axis_dev88.c
hw/display/tc6393xb.c
hw/i386/pc.c
hw/i386/pc_piix.c
hw/i386/pc_sysfw.c
hw/i386/xen/xen_platform.c
hw/ide/ahci.c
hw/ide/atapi.c
hw/ide/cmd646.c
hw/ide/core.c
hw/ide/ich.c
hw/ide/internal.h
hw/ide/isa.c
hw/ide/macio.c
hw/ide/microdrive.c
hw/ide/mmio.c
hw/ide/pci.c
hw/ide/piix.c
hw/ide/qdev.c
hw/ide/via.c
hw/isa/pc87312.c
hw/lm32/lm32_boards.c
hw/lm32/milkymist.c
hw/microblaze/petalogix_ml605_mmu.c
hw/microblaze/petalogix_s3adsp1800_mmu.c
hw/mips/mips_fulong2e.c
hw/mips/mips_jazz.c
hw/mips/mips_malta.c
hw/mips/mips_r4k.c
hw/nvram/spapr_nvram.c
hw/pci/pci-hotplug-old.c
hw/ppc/mac_newworld.c
hw/ppc/mac_oldworld.c
hw/ppc/ppc405_boards.c
hw/ppc/prep.c
hw/ppc/spapr.c
hw/ppc/virtex_ml507.c
hw/s390x/s390-virtio-bus.c
hw/s390x/s390-virtio.c
hw/s390x/virtio-ccw.c
hw/scsi/megasas.c
hw/scsi/scsi-bus.c
hw/scsi/scsi-disk.c
hw/scsi/scsi-generic.c
hw/scsi/virtio-scsi-dataplane.c
hw/scsi/virtio-scsi.c
hw/sd/milkymist-memcard.c
hw/sd/omap_mmc.c
hw/sd/pl181.c
hw/sd/pxa2xx_mmci.c
hw/sd/sd.c
hw/sd/sdhci.c
hw/sd/ssi-sd.c
hw/sh4/r2d.c
hw/sparc/sun4m.c
hw/sparc64/sun4u.c
hw/tpm/tpm_tis.c
hw/tricore/tricore_testboard.c
hw/usb/dev-storage.c
hw/virtio/virtio-pci.c
hw/xen/xen_devconfig.c
hw/xenpv/xen_machine_pv.c
hw/xtensa/xtfpga.c
include/hw/arm/omap.h
include/hw/arm/pxa.h
include/hw/block/block.h
include/hw/block/flash.h
include/hw/qdev-properties.h
include/hw/scsi/scsi.h
include/hw/sd.h
include/hw/virtio/virtio-blk.h
include/sysemu/block-backend.h
include/sysemu/blockdev.h
include/sysemu/dma.h
trace-events