From: Max Reitz <mreitz@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, famz@redhat.com, benoit.canet@nodalink.com,
stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 14/23] hw: Convert from BlockDriverState to BlockBackend, mostly
Date: Sun, 21 Sep 2014 00:01:53 +0200 [thread overview]
Message-ID: <541DF951.4040302@redhat.com> (raw)
In-Reply-To: <1410891148-28849-15-git-send-email-armbru@redhat.com>
On 16.09.2014 20:12, Markus Armbruster wrote:
> 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>
> ---
> block/block-backend.c | 257 +++++++++++++++++++++++++++++++
> blockdev.c | 19 +--
> dma-helpers.c | 61 ++++----
> hw/arm/collie.c | 5 +-
> hw/arm/gumstix.c | 5 +-
> hw/arm/highbank.c | 2 +-
> hw/arm/mainstone.c | 2 +-
> hw/arm/musicpal.c | 10 +-
> hw/arm/nseries.c | 3 +-
> hw/arm/omap1.c | 2 +-
> hw/arm/omap2.c | 2 +-
> hw/arm/omap_sx1.c | 5 +-
> hw/arm/pxa2xx.c | 4 +-
> hw/arm/realview.c | 2 +-
> hw/arm/spitz.c | 4 +-
> hw/arm/tosa.c | 3 +-
> hw/arm/versatilepb.c | 3 +-
> hw/arm/vexpress.c | 3 +-
> hw/arm/xilinx_zynq.c | 3 +-
> hw/arm/z2.c | 3 +-
> hw/block/block.c | 7 +-
> hw/block/dataplane/virtio-blk.c | 24 +--
> hw/block/fdc.c | 78 +++++-----
> hw/block/hd-geometry.c | 24 +--
> hw/block/m25p80.c | 28 ++--
> hw/block/nand.c | 50 +++---
> hw/block/nvme.c | 19 +--
> hw/block/onenand.c | 67 ++++----
> hw/block/pflash_cfi01.c | 24 +--
> hw/block/pflash_cfi02.c | 24 +--
> hw/block/virtio-blk.c | 95 ++++++------
> hw/block/xen_disk.c | 83 +++++-----
> hw/core/qdev-properties-system.c | 26 ++--
> hw/core/qdev-properties.c | 2 +-
> hw/cris/axis_dev88.c | 3 +-
> hw/display/tc6393xb.c | 2 +-
> hw/i386/pc.c | 2 +-
> hw/i386/pc_piix.c | 2 +-
> hw/i386/pc_sysfw.c | 9 +-
> hw/i386/xen/xen_platform.c | 5 +-
> hw/ide/ahci.c | 31 ++--
> hw/ide/atapi.c | 33 ++--
> hw/ide/cmd646.c | 2 +-
> hw/ide/core.c | 186 +++++++++++-----------
> hw/ide/ich.c | 2 +-
> hw/ide/internal.h | 6 +-
> hw/ide/isa.c | 2 +-
> hw/ide/macio.c | 50 +++---
> hw/ide/microdrive.c | 4 +-
> hw/ide/mmio.c | 2 +-
> hw/ide/pci.c | 4 +-
> hw/ide/piix.c | 9 +-
> hw/ide/qdev.c | 11 +-
> hw/ide/via.c | 2 +-
> hw/isa/pc87312.c | 4 +-
> hw/lm32/lm32_boards.c | 5 +-
> hw/lm32/milkymist.c | 3 +-
> hw/microblaze/petalogix_ml605_mmu.c | 3 +-
> hw/microblaze/petalogix_s3adsp1800_mmu.c | 3 +-
> hw/mips/mips_fulong2e.c | 2 +-
> hw/mips/mips_jazz.c | 2 +-
> hw/mips/mips_malta.c | 6 +-
> hw/mips/mips_r4k.c | 3 +-
> hw/nvram/spapr_nvram.c | 17 +-
> hw/pci/pci-hotplug-old.c | 5 +-
> hw/ppc/mac_newworld.c | 2 +-
> hw/ppc/mac_oldworld.c | 2 +-
> hw/ppc/ppc405_boards.c | 26 ++--
> hw/ppc/prep.c | 2 +-
> hw/ppc/spapr.c | 4 +-
> hw/ppc/virtex_ml507.c | 3 +-
> hw/s390x/s390-virtio-bus.c | 2 +-
> hw/s390x/s390-virtio.c | 2 +-
> hw/s390x/virtio-ccw.c | 2 +-
> hw/scsi/megasas.c | 15 +-
> hw/scsi/scsi-bus.c | 8 +-
> hw/scsi/scsi-disk.c | 186 +++++++++++-----------
> hw/scsi/scsi-generic.c | 39 ++---
> hw/sd/milkymist-memcard.c | 8 +-
> hw/sd/omap_mmc.c | 8 +-
> hw/sd/pl181.c | 2 +-
> hw/sd/pxa2xx_mmci.c | 4 +-
> hw/sd/sd.c | 60 ++++----
> hw/sd/sdhci.c | 2 +-
> hw/sd/ssi-sd.c | 2 +-
> hw/sh4/r2d.c | 3 +-
> hw/sparc/sun4m.c | 2 +-
> hw/sparc64/sun4u.c | 2 +-
> hw/tpm/tpm_tis.c | 2 +-
> hw/tricore/tricore_testboard.c | 2 +-
> hw/usb/dev-storage.c | 17 +-
> hw/virtio/virtio-pci.c | 2 +-
> hw/xen/xen_devconfig.c | 1 +
> hw/xenpv/xen_machine_pv.c | 2 +-
> hw/xtensa/xtfpga.c | 3 +-
> include/hw/arm/omap.h | 4 +-
> include/hw/arm/pxa.h | 2 +-
> include/hw/block/block.h | 6 +-
> include/hw/block/flash.h | 6 +-
> include/hw/qdev-properties.h | 8 +-
> include/hw/scsi/scsi.h | 4 +-
> include/hw/sd.h | 2 +-
> include/hw/virtio/virtio-blk.h | 7 +-
> include/qemu/typedefs.h | 1 +
> include/sysemu/block-backend.h | 75 +++++++++
> include/sysemu/blockdev.h | 5 +-
> include/sysemu/dma.h | 24 +--
> trace-events | 8 +-
> 108 files changed, 1126 insertions(+), 810 deletions(-)
[snip]
> diff --git a/include/sysemu/dma.h b/include/sysemu/dma.h
> index bcff53a..15f997b 100644
> --- a/include/sysemu/dma.h
> +++ b/include/sysemu/dma.h
> @@ -197,24 +197,24 @@ void qemu_sglist_add(QEMUSGList *qsg, dma_addr_t base, dma_addr_t len);
> void qemu_sglist_destroy(QEMUSGList *qsg);
> #endif
>
> -typedef BlockAIOCB *DMAIOFunc(BlockDriverState *bs, int64_t sector_num,
> - QEMUIOVector *iov, int nb_sectors,
> - BlockCompletionFunc *cb, void *opaque);
> +typedef BlockAIOCB *DMAIOFunc(BlockBackend *blk, int64_t sector_num,
> + QEMUIOVector *iov, int nb_sectors,
> + BlockCompletionFunc *cb, void *opaque);
This breaks the alignment.
There are a couple files touched by this patch where the only change is
to replace '#include "sysemu/blockdev.h"' and '#include "block/block.h"'
by '#include "sysemu/block-backend.h"' (in xen_devconfig.c you actually
just add the latter and don't remove the former). Although I don't
understand the purpose of this and it seems a mechanical artifact to me,
it certainly won't be hurt anyone. I suppose it's because including
block-backend.h is more correct than the other two (as I can read from
your TODO in block-backend.h).
Anyway, with the alignment not broken:
Reviewed-by: Max Reitz <mreitz@redhat.com>
next prev parent reply other threads:[~2014-09-20 22:02 UTC|newest]
Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 18:12 [Qemu-devel] [PATCH v3 00/23] Split BlockBackend off BDS with an axe Markus Armbruster
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 01/23] block: Split bdrv_new_root() off bdrv_new() Markus Armbruster
2014-09-18 14:44 ` Kevin Wolf
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 02/23] block: New BlockBackend Markus Armbruster
2014-09-19 16:17 ` Kevin Wolf
2014-09-19 17:13 ` Markus Armbruster
2014-09-20 19:04 ` Max Reitz
2014-09-22 6:56 ` Markus Armbruster
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 03/23] block: Connect BlockBackend to BlockDriverState Markus Armbruster
2014-09-20 19:08 ` Max Reitz
2014-09-22 14:59 ` Kevin Wolf
2014-09-22 16:34 ` Markus Armbruster
2014-09-23 11:45 ` Kevin Wolf
2014-09-23 12:52 ` Markus Armbruster
2014-09-23 13:36 ` Kevin Wolf
2014-09-23 15:29 ` Markus Armbruster
2014-09-25 21:54 ` Benoît Canet
2014-09-30 10:40 ` Kevin Wolf
2014-09-30 10:56 ` Markus Armbruster
2014-09-30 11:10 ` Kevin Wolf
2014-09-30 12:03 ` Markus Armbruster
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 04/23] block: Connect BlockBackend and DriveInfo Markus Armbruster
2014-09-20 19:38 ` Max Reitz
2014-09-22 7:33 ` Markus Armbruster
2014-09-22 17:15 ` Kevin Wolf
2014-09-23 10:57 ` Markus Armbruster
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 05/23] block: Code motion to get rid of stubs/blockdev.c Markus Armbruster
2014-09-20 19:46 ` Max Reitz
2014-09-23 12:15 ` Kevin Wolf
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 06/23] block: Make BlockBackend own its BlockDriverState Markus Armbruster
2014-09-20 20:10 ` Max Reitz
2014-09-23 13:12 ` Kevin Wolf
2014-09-23 16:24 ` Markus Armbruster
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 07/23] block: Eliminate bdrv_iterate(), use bdrv_next() Markus Armbruster
2014-09-20 20:29 ` Max Reitz
2014-09-25 11:25 ` Kevin Wolf
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 08/23] block: Eliminate BlockDriverState member device_name[] Markus Armbruster
2014-09-20 20:49 ` Max Reitz
2014-09-25 11:37 ` Kevin Wolf
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 09/23] block: Merge BlockBackend and BlockDriverState name spaces Markus Armbruster
2014-09-20 20:52 ` Max Reitz
2014-09-25 12:57 ` Kevin Wolf
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 10/23] block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo() Markus Armbruster
2014-09-17 11:24 ` Benoît Canet
2014-09-18 7:11 ` Markus Armbruster
2014-09-20 21:09 ` Max Reitz
2014-09-25 13:06 ` Kevin Wolf
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 11/23] block: Rename BlockDriverAIOCB* to BlockAIOCB* Markus Armbruster
2014-09-20 21:16 ` Max Reitz
2014-09-25 13:15 ` Kevin Wolf
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 12/23] virtio-blk: Drop redundant VirtIOBlock member conf Markus Armbruster
2014-09-17 11:31 ` Benoît Canet
2014-09-20 21:22 ` Max Reitz
2014-09-22 7:34 ` Markus Armbruster
2014-09-25 13:18 ` Kevin Wolf
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 13/23] virtio-blk: Rename VirtIOBlkConf variables to conf Markus Armbruster
2014-09-17 11:35 ` Benoît Canet
2014-09-18 7:17 ` Markus Armbruster
2014-09-20 21:25 ` Max Reitz
2014-09-26 13:22 ` Kevin Wolf
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 14/23] hw: Convert from BlockDriverState to BlockBackend, mostly Markus Armbruster
2014-09-20 22:01 ` Max Reitz [this message]
2014-09-22 7:42 ` Markus Armbruster
2014-09-26 14:26 ` Kevin Wolf
2014-09-26 15:00 ` Markus Armbruster
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 15/23] ide: Complete conversion from BlockDriverState to BlockBackend Markus Armbruster
2014-09-20 22:05 ` Max Reitz
2014-09-29 12:07 ` Kevin Wolf
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 16/23] pc87312: Drop unused members of PC87312State Markus Armbruster
2014-09-17 11:44 ` Benoît Canet
2014-09-20 22:07 ` Max Reitz
2014-09-29 12:08 ` Kevin Wolf
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 17/23] blockdev: Drop superfluous DriveInfo member id Markus Armbruster
2014-09-17 11:43 ` Benoît Canet
2014-09-22 12:58 ` Max Reitz
2014-09-29 12:13 ` Kevin Wolf
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 18/23] blockdev: Fix blockdev-add not to create IDE drive (0, 0) Markus Armbruster
2014-09-17 12:09 ` Benoît Canet
2014-09-22 13:05 ` Max Reitz
2014-09-29 12:24 ` Kevin Wolf
2014-09-29 13:05 ` Markus Armbruster
2014-09-29 15:34 ` Kevin Wolf
2014-09-30 6:21 ` Markus Armbruster
2014-09-29 13:12 ` Kevin Wolf
2014-09-29 14:04 ` Markus Armbruster
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 19/23] blockdev: Drop DriveInfo member enable_auto_del Markus Armbruster
2014-09-17 12:12 ` Benoît Canet
2014-09-22 13:16 ` Max Reitz
2014-09-22 15:06 ` Markus Armbruster
2014-09-22 15:12 ` Max Reitz
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 20/23] block/qapi: Convert qmp_query_block() to BlockBackend Markus Armbruster
2014-09-22 12:05 ` Benoît Canet
2014-09-22 13:22 ` Max Reitz
2014-09-29 13:26 ` Kevin Wolf
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 21/23] blockdev: Convert qmp_eject(), qmp_change_blockdev() " Markus Armbruster
2014-09-22 12:08 ` Benoît Canet
2014-09-22 13:26 ` Max Reitz
2014-09-22 15:07 ` Markus Armbruster
2014-09-30 9:55 ` Kevin Wolf
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 22/23] block: Lift device model API into BlockBackend Markus Armbruster
2014-09-22 12:13 ` Benoît Canet
2014-09-22 12:54 ` Markus Armbruster
2014-09-22 13:58 ` Max Reitz
2014-09-30 10:49 ` Kevin Wolf
2014-09-16 18:12 ` [Qemu-devel] [PATCH v3 23/23] block: Make device model's references to BlockBackend strong Markus Armbruster
2014-09-22 12:06 ` Benoît Canet
2014-09-22 14:06 ` Max Reitz
2014-09-22 15:08 ` Markus Armbruster
2014-09-30 11:01 ` Kevin Wolf
2014-09-30 12:04 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=541DF951.4040302@redhat.com \
--to=mreitz@redhat.com \
--cc=armbru@redhat.com \
--cc=benoit.canet@nodalink.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).