[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add |
Date: |
Wed, 16 Sep 2015 08:55:00 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 09/16/2015 01:11 AM, Wen Congyang wrote:
>>>> Possible workaround in the meantime - instead of trying to go with a
>>>> nice flat union (where all QMP keys are in the same {} level), we can
>>>> use nesting (structs that add another {} to include the unions).
>>>
>>> How to include the unions to a structs? Use 'base'?
>>
>> Conceptually, by adding a layer of nesting. On the wire, instead of:
>>
>> { "switch1":"value", "switch2":"value", "body2":"blah" }
>>
>> you would instead have:
>>
>> { "switch1":"value", "data": { "switch2":"value", "body2":"blah" } }
>>
>> Anywhere in qapi that you try to have:
>> { 'union': ..., 'data':{'switch1':'Union'}}
>>
>> you instead create a wrapper type:
>> { 'struct':'Wrapper', 'data':{'data':'Union'}}
>> { 'union': ..., 'data':{'switch1':'Wrapper'}}
>
> If so, the option is "data.switch1" not "switch1"
>
>>
>>
>> What I don't know is whether the extra QMP nesting makes it easier or
>> harder to support the existing NBD command line options, and it would
>
> Yes, it is harder to support it.
All the more reason to push the qapi improvements through, so that qapi
can expose a flat union and not make the command line have to go through
ugly nesting.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add, (continued)
- Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add, Eric Blake, 2015/09/15
- Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add, Kevin Wolf, 2015/09/15
- Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add, Wen Congyang, 2015/09/14
- Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add, Wen Congyang, 2015/09/14
- Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add, Eric Blake, 2015/09/14
- Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add, Wen Congyang, 2015/09/14
- Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add, Eric Blake, 2015/09/15
- Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add, Wen Congyang, 2015/09/16
- Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add,
Eric Blake <=
[Qemu-devel] [PATCH v3 5/5] hmp: add monitor command to add/remove a child, Wen Congyang, 2015/09/10
[Qemu-devel] [PATCH v3 4/5] qmp: add monitor command to add/remove a child, Wen Congyang, 2015/09/10
- Re: [Qemu-devel] [PATCH v3 4/5] qmp: add monitor command to add/remove a child, Daniel P. Berrange, 2015/09/10
- Re: [Qemu-devel] [PATCH v3 4/5] qmp: add monitor command to add/remove a child, Markus Armbruster, 2015/09/14
- Re: [Qemu-devel] [PATCH v3 4/5] qmp: add monitor command to add/remove a child, Wen Congyang, 2015/09/14
- Re: [Qemu-devel] [PATCH v3 4/5] qmp: add monitor command to add/remove a child, Markus Armbruster, 2015/09/15
- Re: [Qemu-devel] [PATCH v3 4/5] qmp: add monitor command to add/remove a child, Wen Congyang, 2015/09/15