[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 07/15] qapi-schema: SocketAddressFlat variants 'vsock
From: |
Max Reitz |
Subject: |
[Qemu-block] [PULL 07/15] qapi-schema: SocketAddressFlat variants 'vsock' and 'fd' |
Date: |
Mon, 3 Apr 2017 17:33:47 +0200 |
From: Markus Armbruster <address@hidden>
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
'inet' or 'unix'.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
---
qapi-schema.json | 19 ++++++++-----------
block/gluster.c | 2 ++
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index b921994ae3..250e4dc49b 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4144,7 +4144,7 @@
# Since: 2.9
##
{ 'enum': 'SocketAddressFlatType',
- 'data': [ 'unix', 'inet' ] }
+ 'data': [ 'inet', 'unix', 'vsock', 'fd' ] }
##
# @SocketAddressFlat:
@@ -4153,22 +4153,19 @@
#
# @type: Transport type
#
-# This is similar to SocketAddress, only distinction:
-#
-# 1. SocketAddressFlat is a flat union, SocketAddress is a simple union.
-# A flat union is nicer than simple because it avoids nesting
-# (i.e. more {}) on the wire.
-#
-# 2. SocketAddressFlat supports only types 'unix' and 'inet', because
-# that's what its current users need.
+# This is just like SocketAddress, except it's a flat union rather
+# than a simple union. Nicer because it avoids nesting on the wire,
+# i.e. this form has fewer {}.
#
# Since: 2.9
##
{ 'union': 'SocketAddressFlat',
'base': { 'type': 'SocketAddressFlatType' },
'discriminator': 'type',
- 'data': { 'unix': 'UnixSocketAddress',
- 'inet': 'InetSocketAddress' } }
+ 'data': { 'inet': 'InetSocketAddress',
+ 'unix': 'UnixSocketAddress',
+ 'vsock': 'VsockSocketAddress',
+ 'fd': 'String' } }
##
# @getfd:
diff --git a/block/gluster.c b/block/gluster.c
index fb0aafeaa3..cf29b5f9a4 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -429,6 +429,8 @@ static struct glfs
*qemu_gluster_glfs_init(BlockdevOptionsGluster *gconf,
server->value->u.inet.host,
(int)port);
break;
+ case SOCKET_ADDRESS_FLAT_TYPE_VSOCK:
+ case SOCKET_ADDRESS_FLAT_TYPE_FD:
default:
abort();
}
--
2.12.1
- [Qemu-block] [PULL 00/15] Block patches for rc3, Max Reitz, 2017/04/03
- [Qemu-block] [PULL 02/15] nbd sockets vnc: Mark problematic address family tests TODO, Max Reitz, 2017/04/03
- [Qemu-block] [PULL 01/15] block: add missed aio_context_acquire into release_drive, Max Reitz, 2017/04/03
- [Qemu-block] [PULL 04/15] io vnc sockets: Clean up SocketAddressKind switches, Max Reitz, 2017/04/03
- [Qemu-block] [PULL 03/15] char: Fix socket with "type": "vsock" address, Max Reitz, 2017/04/03
- [Qemu-block] [PULL 05/15] block: Document -drive problematic code and bugs, Max Reitz, 2017/04/03
- [Qemu-block] [PULL 06/15] gluster: Prepare for SocketAddressFlat extension, Max Reitz, 2017/04/03
- [Qemu-block] [PULL 07/15] qapi-schema: SocketAddressFlat variants 'vsock' and 'fd',
Max Reitz <=
- [Qemu-block] [PULL 08/15] sockets: New helper socket_address_crumple(), Max Reitz, 2017/04/03
- [Qemu-block] [PULL 09/15] nbd: Tidy up blockdev-add interface, Max Reitz, 2017/04/03
- [Qemu-block] [PULL 10/15] sheepdog: Fix blockdev-add, Max Reitz, 2017/04/03
- [Qemu-block] [PULL 11/15] qemu-io-cmds: Assert that global and nofile commands don't use ct->perms, Max Reitz, 2017/04/03
- [Qemu-block] [PULL 13/15] qcow2: Discard unaligned tail when wiping image, Max Reitz, 2017/04/03
- [Qemu-block] [PULL 12/15] iotests: fix 097 when run with qcow, Max Reitz, 2017/04/03
- [Qemu-block] [PULL 15/15] block/parallels: Avoid overflows, Max Reitz, 2017/04/03
- [Qemu-block] [PULL 14/15] iotests: Improve image-clear tests on non-aligned image, Max Reitz, 2017/04/03
- Re: [Qemu-block] [PULL 00/15] Block patches for rc3, Peter Maydell, 2017/04/03