From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XfCJR-00076w-Vj for qemu-devel@nongnu.org; Fri, 17 Oct 2014 14:31:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XfCJL-0004Si-Rf for qemu-devel@nongnu.org; Fri, 17 Oct 2014 14:31:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XfCJL-0004SN-Kb for qemu-devel@nongnu.org; Fri, 17 Oct 2014 14:31:35 -0400 Date: Fri, 17 Oct 2014 20:31:26 +0200 From: Kevin Wolf Message-ID: <20141017183126.GA23347@noname.redhat.com> References: <1412683166-4934-1-git-send-email-armbru@redhat.com> <1412683166-4934-17-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1412683166-4934-17-git-send-email-armbru@redhat.com> Subject: Re: [Qemu-devel] [PATCH v6 16/24] hw: Convert from BlockDriverState to BlockBackend, mostly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: mreitz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, benoit.canet@nodalink.com 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 > 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