[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 16/24] hw: Convert from BlockDriverState to B
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v6 16/24] hw: Convert from BlockDriverState to BlockBackend, mostly |
Date: |
Fri, 17 Oct 2014 20:31:26 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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 <address@hidden>
> 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
- [Qemu-devel] [PATCH v6 19/24] blockdev: Drop superfluous DriveInfo member id, (continued)
- [Qemu-devel] [PATCH v6 19/24] blockdev: Drop superfluous DriveInfo member id, Markus Armbruster, 2014/10/07
- [Qemu-devel] [PATCH v6 12/24] block: Rename BlockDriverAIOCB* to BlockAIOCB*, Markus Armbruster, 2014/10/07
- [Qemu-devel] [PATCH v6 15/24] virtio-blk: Rename VirtIOBlkConf variables to conf, Markus Armbruster, 2014/10/07
- [Qemu-devel] [PATCH v6 20/24] blockdev: Fix blockdev-add not to create DriveInfo, Markus Armbruster, 2014/10/07
- [Qemu-devel] [PATCH v6 22/24] blockdev: Convert qmp_eject(), qmp_change_blockdev() to BlockBackend, Markus Armbruster, 2014/10/07
- [Qemu-devel] [PATCH v6 18/24] pc87312: Drop unused members of PC87312State, Markus Armbruster, 2014/10/07
- [Qemu-devel] [PATCH v6 23/24] block: Lift device model API into BlockBackend, Markus Armbruster, 2014/10/07
- [Qemu-devel] [PATCH v6 13/24] block: Rename BlockDriverCompletionFunc to BlockCompletionFunc, Markus Armbruster, 2014/10/07
- [Qemu-devel] [PATCH v6 16/24] hw: Convert from BlockDriverState to BlockBackend, mostly, Markus Armbruster, 2014/10/07
- Re: [Qemu-devel] [PATCH v6 00/24] Split BlockBackend off BDS with an axe, Kevin Wolf, 2014/10/17