[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [for-2.9 6/8] qapi-schema: SocketAddressFl
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-block] [Qemu-devel] [for-2.9 6/8] qapi-schema: SocketAddressFlat variants 'vsock' and 'fd' |
Date: |
Thu, 30 Mar 2017 08:55:07 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Eric Blake <address@hidden> writes:
> On 03/29/2017 11:45 AM, Markus Armbruster wrote:
>> Note that the new variants are impossible in qemu_gluster_glfs_init(),
>> because the gconf->server can only come from qemu_gluster_parse_uri()
>> or qemu_gluster_parse_json(), and neither can create anything but
>> 'tcp' or 'unix'.
>>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>> block/gluster.c | 2 ++
>> qapi-schema.json | 19 ++++++++-----------
>> 2 files changed, 10 insertions(+), 11 deletions(-)
>
>> +# This is just like SocketAddress, except it's a flat union rather
>> +# than a simple union. Nicer because it avoids nesting (i.e. more {})
>> +# on the wire.
>> #
>> # Since: 2.9
>> ##
>> { 'union': 'SocketAddressFlat',
>> 'base': { 'type': 'SocketAddressFlatType' },
>> 'discriminator': 'type',
>> - 'data': { 'unix': 'UnixSocketAddress',
>> - 'inet': 'InetSocketAddress' } }
>> + 'data': { 'inet': 'InetSocketAddress',
>> + 'unix': 'UnixSocketAddress',
>> + 'vsock': 'VsockSocketAddress',
>> + 'fd': 'String' } }
>
> Can we make 'fd':'str'? That would be even less pointless nesting on
> the wire.
I guess it's wrapped in an object here to keep the door open for
future extensions. Perhaps also for symmetry.