qemu-devel
[Top][All Lists]
Advanced

[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: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v6 16/24] hw: Convert from BlockDriverState to BlockBackend, mostly
Date: Mon, 20 Oct 2014 10:19:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Kevin Wolf <address@hidden> writes:

> 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.

Yes, please!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]