Skip to contentSkip to conversation

Support Archipelago as a QEMU block backend

PATCH Applied Chrysostomos Nanakos 5 participants 13 messages Jul 23, 2014 – Aug 5, 2014 Block layer

lore
Share & tools
lore
#0 lore raw

v7 cover Support Archipelago as a QEMU block backend

v7:
- Fix coding style issues.
- Rename __archipelago_submit_request function to archipelago_submit_request.
- Set X_NONBLOCK flag to xseg_receive().
- Return -EIO to .bdrv_getlength() if archipelago_volume_info() fails.
- Fix segment_name mem leak.
- Bump version number from 2.1 to 2.2 in qapi/block-core.json file concerning QEMU Archipelago support.
- Convert qemu_aio_wait() to aio_poll().
- Remove qemu_blockalign() and memcpy() call and use qemu_iovec_to_buf() directly.

v6:
- Split v5 1/4 patch into two different patches. First one implements QMP structured options and the second one implements bdrv_parse_filename().

v5:
- Remove useless qemu_aio_count variable from BDRVArchipelagoState struct.
- Cleanup xseg signal descriptor, call xseg_quit_local_signal() when closing block device.
- Fix ds and volname leaks.
- Make xseg request handler thread joinable and wait until exits before destroying condition variables and mutexes. Thanks to Stefan Hajnoczi for pointing this out.
- Remove error_propagate() useless call.
- Use memcpy instead of strncpy.
- Remove check after trying to allocate memory with g_malloc().
- Remove pipe code and complete AIO by introducing QEMU "bottom-half".
- Add Archipelago shared memory segment name in options list and QMP.
- Remove functions archipelago_aio_read()/_write() and introduce new and simpler function, __archipelago_submit_request().
Refactor archipelago_aio_segmented_rw() function.
- Enable Archipelago support in qemu-iotests

v4:
- Move Archipelago QMP support from qapi-schema.json file to qapi/block-core.json. Fixe various typographic errors, thanks to Kevin Wolf and Eric Blake.
- Use new .create_opts format, define new QemuOptsList structure and refactor qemu_archipelago_create function.

v3:
- Break down initial patch from one to three. First patch implements Archipelago QEMU block backend with read/write functionality. Second patch implements .bdrv_create() and adds support for creating Archipelago images. Third patch adds QMP support.
- Remove global variable g_xseg_init, make xseg_initialize(), xseg_join() and xseg_leave() reentrant and thread-safe.
- Introduce new enum BlockdevOptionsArchipelago for the QMP support.

v2:
- Implement .bdrv_parse_filename() function to convert the shortuct version with a single string to the individual options.
- Remove global variables and move relevant fields to ArchipelagoAIOCB struct.
- Remove ArchipelagoConf struct and use the relevant fields as individual arguments.
- Remove ArchipelagoCB struct and use ArchipelagoAIOCB instead.
- Remove ArchipelagoThread struct and move relevant fields to ArchipelagoAIOCB instead. Now an I/O thread is spawned for per-device to handle all async I/O requests.
- Remove double data copy, use qemu_iovec_from_buf() and copy data directly to the destination buffer.
- Remove archipelago_aio_bh_cb() function, a full request is completed in qemu_archipelago_complete_aio() instead.
- Resolve proposed changes from Kevin Wolf and miscellaneous style issues.

Chrysostomos Nanakos (5):
block: Support Archipelago as a QEMU block backend block/archipelago: Implement bdrv_parse_filename() block/archipelago: Add support for creating images
QMP: Add support for Archipelago
qemu-iotests: add support for Archipelago protocol

 MAINTAINERS                  |    6 +
 block/Makefile.objs          |    2 +
 block/archipelago.c          | 1064 ++++++++++++++++++++++++++++++++++++++++++
 configure                    |   40 ++
 qapi/block-core.json         |   38 +-
 tests/qemu-iotests/common    |    6 +
 tests/qemu-iotests/common.rc |    9 +-
 7 files changed, 1161 insertions(+), 4 deletions(-)
 create mode 100644 block/archipelago.c
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v7 1/5 block: Support Archipelago as a QEMU block backend

VM Image on Archipelago volume is specified like this:

file.driver=archipelago,file.volume=<volumename>[,file.mport=<mapperd_port>[, file.vport=<vlmcd_port>][,file.segment=<segment_name>]]

'archipelago' is the protocol.

'mport' is the port number on which mapperd is listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

'vport' is the port number on which vlmcd is listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

'segment' is the name of the shared memory segment Archipelago stack is using. This is optional and if not specified, QEMU will make Archipelago to use the default value, 'archipelago'.

Examples:

file.driver=archipelago,file.volume=my_vm_volume file.driver=archipelago,file.volume=my_vm_volume,file.mport=123 file.driver=archipelago,file.volume=my_vm_volume,file.mport=123, file.vport=1234 file.driver=archipelago,file.volume=my_vm_volume,file.mport=123, file.vport=1234,file.segment=my_segment

---
 MAINTAINERS         |    6 +
 block/Makefile.objs |    2 +
 block/archipelago.c |  785 +++++++++++++++++++++++++++++++++++++++++++++++++++
 configure           |   40 +++
 4 files changed, 833 insertions(+)
 create mode 100644 block/archipelago.c
MAINTAINERS +6 -0
index 906f252..59940f9 100644
@@ -1000,3 +1000,9 @@ SSH
 M: Richard W.M. Jones <[email protected]>
 S: Supported
 F: block/ssh.c
+
+ARCHIPELAGO
+M: Chrysostomos Nanakos <[email protected]>
+M: Chrysostomos Nanakos <[email protected]>
+S: Maintained
+F: block/archipelago.c
block/Makefile.objs +2 -0
index fd88c03..858d2b3 100644
@@ -17,6 +17,7 @@ block-obj-$(CONFIG_LIBNFS) += nfs.o
 block-obj-$(CONFIG_CURL) += curl.o
 block-obj-$(CONFIG_RBD) += rbd.o
 block-obj-$(CONFIG_GLUSTERFS) += gluster.o
+block-obj-$(CONFIG_ARCHIPELAGO) += archipelago.o
 block-obj-$(CONFIG_LIBSSH2) += ssh.o
 endif
 
@@ -35,5 +36,6 @@ gluster.o-cflags   := $(GLUSTERFS_CFLAGS)
 gluster.o-libs     := $(GLUSTERFS_LIBS)
 ssh.o-cflags       := $(LIBSSH2_CFLAGS)
 ssh.o-libs         := $(LIBSSH2_LIBS)
+archipelago.o-libs := $(ARCHIPELAGO_LIBS)
 qcow.o-libs        := -lz
 linux-aio.o-libs   := -laio
block/archipelago.c new file +785 -0

785 lines not on this page · raw message

configure +40 -0
index f7685b5..8a5cc5e 100755
@@ -326,6 +326,7 @@ seccomp=""
 glusterfs=""
 glusterfs_discard="no"
 glusterfs_zerofill="no"
+archipelago=""
 virtio_blk_data_plane=""
 gtk=""
 gtkabi=""
@@ -1087,6 +1088,10 @@ for opt do
   ;;
   --enable-glusterfs) glusterfs="yes"
   ;;
+  --disable-archipelago) archipelago="no"
+  ;;
+  --enable-archipelago) archipelago="yes"
+  ;;
   --disable-virtio-blk-data-plane) virtio_blk_data_plane="no"
   ;;
   --enable-virtio-blk-data-plane) virtio_blk_data_plane="yes"
@@ -1382,6 +1387,8 @@ Advanced options (experts only):
   --enable-coroutine-pool  enable coroutine freelist (better performance)
   --enable-glusterfs       enable GlusterFS backend
   --disable-glusterfs      disable GlusterFS backend
+  --enable-archipelago     enable Archipelago backend
+  --disable-archipelago    disable Archipelago backend
   --enable-gcov            enable test coverage analysis with gcov
   --gcov=GCOV              use specified gcov [$gcov_tool]
   --disable-tpm            disable TPM support
@@ -3071,6 +3078,33 @@ EOF
   fi
 fi
 
+
+##########################################
+# archipelago probe
+if test "$archipelago" != "no" ; then
+    cat > $TMPC <<EOF
+#include <stdio.h>
+#include <xseg/xseg.h>
+#include <xseg/protocol.h>
+int main(void) {
+    xseg_initialize();
+    return 0;
+}
+EOF
+    archipelago_libs=-lxseg
+    if compile_prog "" "$archipelago_libs"; then
+        archipelago="yes"
+        libs_tools="$archipelago_libs $libs_tools"
+        libs_softmmu="$archipelago_libs $libs_softmmu"
+    else
+      if test "$archipelago" = "yes" ; then
+        feature_not_found "Archipelago backend support" "Install libxseg devel"
+      fi
+      archipelago="no"
+    fi
+fi
+
+
 ##########################################
 # glusterfs probe
 if test "$glusterfs" != "no" ; then
@@ -4250,6 +4284,7 @@ echo "seccomp support   $seccomp"
 echo "coroutine backend $coroutine"
 echo "coroutine pool    $coroutine_pool"
 echo "GlusterFS support $glusterfs"
+echo "Archipelago support $archipelago"
 echo "virtio-blk-data-plane $virtio_blk_data_plane"
 echo "gcov              $gcov_tool"
 echo "gcov enabled      $gcov"
@@ -4688,6 +4723,11 @@ if test "$glusterfs_zerofill" = "yes" ; then
   echo "CONFIG_GLUSTERFS_ZEROFILL=y" >> $config_host_mak
 fi
 
+if test "$archipelago" = "yes" ; then
+  echo "CONFIG_ARCHIPELAGO=m" >> $config_host_mak
+  echo "ARCHIPELAGO_LIBS=$archipelago_libs" >> $config_host_mak
+fi
+
 if test "$libssh2" = "yes" ; then
   echo "CONFIG_LIBSSH2=m" >> $config_host_mak
   echo "LIBSSH2_CFLAGS=$libssh2_cflags" >> $config_host_mak
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH v8 1/5 block: Support Archipelago as a QEMU block backend

VM Image on Archipelago volume is specified like this:

file.driver=archipelago,file.volume=<volumename>[,file.mport=<mapperd_port>[, file.vport=<vlmcd_port>][,file.segment=<segment_name>]]

'archipelago' is the protocol.

'mport' is the port number on which mapperd is listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

'vport' is the port number on which vlmcd is listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

'segment' is the name of the shared memory segment Archipelago stack is using. This is optional and if not specified, QEMU will make Archipelago to use the default value, 'archipelago'.

Examples:

file.driver=archipelago,file.volume=my_vm_volume file.driver=archipelago,file.volume=my_vm_volume,file.mport=123 file.driver=archipelago,file.volume=my_vm_volume,file.mport=123, file.vport=1234 file.driver=archipelago,file.volume=my_vm_volume,file.mport=123, file.vport=1234,file.segment=my_segment

---
 MAINTAINERS         |    6 +
 block/Makefile.objs |    2 +
 block/archipelago.c |  787 +++++++++++++++++++++++++++++++++++++++++++++++++++
 configure           |   40 +++
 4 files changed, 835 insertions(+)
 create mode 100644 block/archipelago.c
MAINTAINERS +6 -0
index 906f252..59940f9 100644
@@ -1000,3 +1000,9 @@ SSH
 M: Richard W.M. Jones <[email protected]>
 S: Supported
 F: block/ssh.c
+
+ARCHIPELAGO
+M: Chrysostomos Nanakos <[email protected]>
+M: Chrysostomos Nanakos <[email protected]>
+S: Maintained
+F: block/archipelago.c
block/Makefile.objs +2 -0
index fd88c03..858d2b3 100644
@@ -17,6 +17,7 @@ block-obj-$(CONFIG_LIBNFS) += nfs.o
 block-obj-$(CONFIG_CURL) += curl.o
 block-obj-$(CONFIG_RBD) += rbd.o
 block-obj-$(CONFIG_GLUSTERFS) += gluster.o
+block-obj-$(CONFIG_ARCHIPELAGO) += archipelago.o
 block-obj-$(CONFIG_LIBSSH2) += ssh.o
 endif
 
@@ -35,5 +36,6 @@ gluster.o-cflags   := $(GLUSTERFS_CFLAGS)
 gluster.o-libs     := $(GLUSTERFS_LIBS)
 ssh.o-cflags       := $(LIBSSH2_CFLAGS)
 ssh.o-libs         := $(LIBSSH2_LIBS)
+archipelago.o-libs := $(ARCHIPELAGO_LIBS)
 qcow.o-libs        := -lz
 linux-aio.o-libs   := -laio
block/archipelago.c new file +787 -0

787 lines not on this page · raw message

configure +40 -0
index f7685b5..8a5cc5e 100755
@@ -326,6 +326,7 @@ seccomp=""
 glusterfs=""
 glusterfs_discard="no"
 glusterfs_zerofill="no"
+archipelago=""
 virtio_blk_data_plane=""
 gtk=""
 gtkabi=""
@@ -1087,6 +1088,10 @@ for opt do
   ;;
   --enable-glusterfs) glusterfs="yes"
   ;;
+  --disable-archipelago) archipelago="no"
+  ;;
+  --enable-archipelago) archipelago="yes"
+  ;;
   --disable-virtio-blk-data-plane) virtio_blk_data_plane="no"
   ;;
   --enable-virtio-blk-data-plane) virtio_blk_data_plane="yes"
@@ -1382,6 +1387,8 @@ Advanced options (experts only):
   --enable-coroutine-pool  enable coroutine freelist (better performance)
   --enable-glusterfs       enable GlusterFS backend
   --disable-glusterfs      disable GlusterFS backend
+  --enable-archipelago     enable Archipelago backend
+  --disable-archipelago    disable Archipelago backend
   --enable-gcov            enable test coverage analysis with gcov
   --gcov=GCOV              use specified gcov [$gcov_tool]
   --disable-tpm            disable TPM support
@@ -3071,6 +3078,33 @@ EOF
   fi
 fi
 
+
+##########################################
+# archipelago probe
+if test "$archipelago" != "no" ; then
+    cat > $TMPC <<EOF
+#include <stdio.h>
+#include <xseg/xseg.h>
+#include <xseg/protocol.h>
+int main(void) {
+    xseg_initialize();
+    return 0;
+}
+EOF
+    archipelago_libs=-lxseg
+    if compile_prog "" "$archipelago_libs"; then
+        archipelago="yes"
+        libs_tools="$archipelago_libs $libs_tools"
+        libs_softmmu="$archipelago_libs $libs_softmmu"
+    else
+      if test "$archipelago" = "yes" ; then
+        feature_not_found "Archipelago backend support" "Install libxseg devel"
+      fi
+      archipelago="no"
+    fi
+fi
+
+
 ##########################################
 # glusterfs probe
 if test "$glusterfs" != "no" ; then
@@ -4250,6 +4284,7 @@ echo "seccomp support   $seccomp"
 echo "coroutine backend $coroutine"
 echo "coroutine pool    $coroutine_pool"
 echo "GlusterFS support $glusterfs"
+echo "Archipelago support $archipelago"
 echo "virtio-blk-data-plane $virtio_blk_data_plane"
 echo "gcov              $gcov_tool"
 echo "gcov enabled      $gcov"
@@ -4688,6 +4723,11 @@ if test "$glusterfs_zerofill" = "yes" ; then
   echo "CONFIG_GLUSTERFS_ZEROFILL=y" >> $config_host_mak
 fi
 
+if test "$archipelago" = "yes" ; then
+  echo "CONFIG_ARCHIPELAGO=m" >> $config_host_mak
+  echo "ARCHIPELAGO_LIBS=$archipelago_libs" >> $config_host_mak
+fi
+
 if test "$libssh2" = "yes" ; then
   echo "CONFIG_LIBSSH2=m" >> $config_host_mak
   echo "LIBSSH2_CFLAGS=$libssh2_cflags" >> $config_host_mak
Signature · 1 line
1.7.10.4
Reviewed-by on v8 1/5
#3 lore raw

Re: [Qemu-devel] [PATCH v8 1/5] block: Support Archipelago as a QEMU block backend

Quoted 26 lines · Chrysostomos Nanakos

VM Image on Archipelago volume is specified like this:

file.driver=archipelago,file.volume=<volumename>[,file.mport=<mapperd_port>[, file.vport=<vlmcd_port>][,file.segment=<segment_name>]]

'archipelago' is the protocol.

'mport' is the port number on which mapperd is listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

'vport' is the port number on which vlmcd is listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

'segment' is the name of the shared memory segment Archipelago stack is using. This is optional and if not specified, QEMU will make Archipelago to use the default value, 'archipelago'.

Examples:

file.driver=archipelago,file.volume=my_vm_volume file.driver=archipelago,file.volume=my_vm_volume,file.mport=123 file.driver=archipelago,file.volume=my_vm_volume,file.mport=123, file.vport=1234 file.driver=archipelago,file.volume=my_vm_volume,file.mport=123, file.vport=1234,file.segment=my_segment

Quoted 8 lines
---
 MAINTAINERS         |    6 +
 block/Makefile.objs |    2 +
 block/archipelago.c |  787 +++++++++++++++++++++++++++++++++++++++++++++++++++
 configure           |   40 +++
 4 files changed, 835 insertions(+)
 create mode 100644 block/archipelago.c

The diff is that a flush op is used now:
+ case ARCHIP_OP_FLUSH:
+ req->op = X_FLUSH;
+ break;

Kevin: Please replace the v7 commit with this new patch on the block branch.

#4 lore raw

Re: [Qemu-devel] [PATCH v8 1/5] block: Support Archipelago as a QEMU block backend

Am 05.08.2014 um 10:20 hat Stefan Hajnoczi geschrieben:

Quoted 41 lines · Chrysostomos Nanakos
Quoted 26 lines

VM Image on Archipelago volume is specified like this:

file.driver=archipelago,file.volume=<volumename>[,file.mport=<mapperd_port>[, file.vport=<vlmcd_port>][,file.segment=<segment_name>]]

'archipelago' is the protocol.

'mport' is the port number on which mapperd is listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

'vport' is the port number on which vlmcd is listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

'segment' is the name of the shared memory segment Archipelago stack is using. This is optional and if not specified, QEMU will make Archipelago to use the default value, 'archipelago'.

Examples:

file.driver=archipelago,file.volume=my_vm_volume file.driver=archipelago,file.volume=my_vm_volume,file.mport=123 file.driver=archipelago,file.volume=my_vm_volume,file.mport=123, file.vport=1234 file.driver=archipelago,file.volume=my_vm_volume,file.mport=123, file.vport=1234,file.segment=my_segment

Quoted 8 lines
---
 MAINTAINERS         |    6 +
 block/Makefile.objs |    2 +
 block/archipelago.c |  787 +++++++++++++++++++++++++++++++++++++++++++++++++++
 configure           |   40 +++
 4 files changed, 835 insertions(+)
 create mode 100644 block/archipelago.c

The diff is that a flush op is used now:

block/archipelago.c new file +3 -0
+    case ARCHIP_OP_FLUSH:
+        req->op = X_FLUSH;
+        break;
Quoted 4 lines

Kevin: Please replace the v7 commit with this new patch on the block branch.

Already did that, will add your Reviewed-by now.

Kevin

#5 lore raw

PATCH v7 2/5 block/archipelago: Implement bdrv_parse_filename()

In reply to Chrysostomos Nanakos

VM Image on Archipelago volume can also be specified like this:

file=archipelago:<volumename>[/mport=<mapperd_port>[:vport=<vlmcd_port>][:
segment=<segment_name>]]

Examples:

file=archipelago:my_vm_volume file=archipelago:my_vm_volume/mport=123 file=archipelago:my_vm_volume/mport=123:vport=1234 file=archipelago:my_vm_volume/mport=123:vport=1234:segment=my_segment

---
 block/archipelago.c |  140 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 138 insertions(+), 2 deletions(-)
block/archipelago.c +138 -2
index 1c21d36..5a9fc68 100644
@@ -15,6 +15,11 @@
  * [,file.mport=<mapperd_port>[,file.vport=<vlmcd_port>]
  * [,file.segment=<segment_name>]]
  *
+ * or
+ *
+ * file=archipelago:<volumename>[/mport=<mapperd_port>[:vport=<vlmcd_port>][:
+ * segment=<segment_name>]]
+ *
  * 'archipelago' is the protocol.
  *
  * 'mport' is the port number on which mapperd is listening. This is optional
@@ -32,11 +37,20 @@
  * file.driver=archipelago,file.volume=my_vm_volume
  * file.driver=archipelago,file.volume=my_vm_volume,file.mport=123
  * file.driver=archipelago,file.volume=my_vm_volume,file.mport=123,
- * file.vport=1234
+ *  file.vport=1234
  * file.driver=archipelago,file.volume=my_vm_volume,file.mport=123,
- * file.vport=1234,file.segment=my_segment
+ *  file.vport=1234,file.segment=my_segment
+ *
+ * or
+ *
+ * file=archipelago:my_vm_volume
+ * file=archipelago:my_vm_volume/mport=123
+ * file=archipelago:my_vm_volume/mport=123:vport=1234
+ * file=archipelago:my_vm_volume/mport=123:vport=1234:segment=my_segment
+ *
  */
 
+#include "qemu-common.h"
 #include "block/block_int.h"
 #include "qemu/error-report.h"
 #include "qemu/thread.h"
@@ -309,6 +323,127 @@ static void qemu_archipelago_complete_aio(void *opaque)
     g_free(reqdata);
 }
 
+static void xseg_find_port(char *pstr, const char *needle, xport *aport)
+{
+    const char *a;
+    char *endptr = NULL;
+    unsigned long port;
+    if (strstart(pstr, needle, &a)) {
+        if (strlen(a) > 0) {
+            port = strtoul(a, &endptr, 10);
+            if (strlen(endptr)) {
+                *aport = -2;
+                return;
+            }
+            *aport = (xport) port;
+        }
+    }
+}
+
+static void xseg_find_segment(char *pstr, const char *needle,
+                              char **segment_name)
+{
+    const char *a;
+    if (strstart(pstr, needle, &a)) {
+        if (strlen(a) > 0) {
+            *segment_name = g_strdup(a);
+        }
+    }
+}
+
+static void parse_filename_opts(const char *filename, Error **errp,
+                                char **volume, char **segment_name,
+                                xport *mport, xport *vport)
+{
+    const char *start;
+    char *tokens[4], *ds;
+    int idx;
+    xport lmport = NoPort, lvport = NoPort;
+
+    strstart(filename, "archipelago:", &start);
+
+    ds = g_strdup(start);
+    tokens[0] = strtok(ds, "/");
+    tokens[1] = strtok(NULL, ":");
+    tokens[2] = strtok(NULL, ":");
+    tokens[3] = strtok(NULL, "\0");
+
+    if (!strlen(tokens[0])) {
+        error_setg(errp, "volume name must be specified first");
+        g_free(ds);
+        return;
+    }
+
+    for (idx = 1; idx < 4; idx++) {
+        if (tokens[idx] != NULL) {
+            if (strstart(tokens[idx], "mport=", NULL)) {
+                xseg_find_port(tokens[idx], "mport=", &lmport);
+            }
+            if (strstart(tokens[idx], "vport=", NULL)) {
+                xseg_find_port(tokens[idx], "vport=", &lvport);
+            }
+            if (strstart(tokens[idx], "segment=", NULL)) {
+                xseg_find_segment(tokens[idx], "segment=", segment_name);
+            }
+        }
+    }
+
+    if ((lmport == -2) || (lvport == -2)) {
+        error_setg(errp, "mport and/or vport must be set");
+        g_free(ds);
+        return;
+    }
+    *volume = g_strdup(tokens[0]);
+    *mport = lmport;
+    *vport = lvport;
+    g_free(ds);
+}
+
+static void archipelago_parse_filename(const char *filename, QDict *options,
+                                       Error **errp)
+{
+    const char *start;
+    char *volume = NULL, *segment_name = NULL;
+    xport mport = NoPort, vport = NoPort;
+
+    if (qdict_haskey(options, ARCHIPELAGO_OPT_VOLUME)
+            || qdict_haskey(options, ARCHIPELAGO_OPT_SEGMENT)
+            || qdict_haskey(options, ARCHIPELAGO_OPT_MPORT)
+            || qdict_haskey(options, ARCHIPELAGO_OPT_VPORT)) {
+        error_setg(errp, "volume/mport/vport/segment and a file name may not"
+                         " be specified at the same time");
+        return;
+    }
+
+    if (!strstart(filename, "archipelago:", &start)) {
+        error_setg(errp, "File name must start with 'archipelago:'");
+        return;
+    }
+
+    if (!strlen(start) || strstart(start, "/", NULL)) {
+        error_setg(errp, "volume name must be specified");
+        return;
+    }
+
+    parse_filename_opts(filename, errp, &volume, &segment_name, &mport, &vport);
+
+    if (volume) {
+        qdict_put(options, ARCHIPELAGO_OPT_VOLUME, qstring_from_str(volume));
+        g_free(volume);
+    }
+    if (segment_name) {
+        qdict_put(options, ARCHIPELAGO_OPT_SEGMENT,
+                  qstring_from_str(segment_name));
+        g_free(segment_name);
+    }
+    if (mport != NoPort) {
+        qdict_put(options, ARCHIPELAGO_OPT_MPORT, qint_from_int(mport));
+    }
+    if (vport != NoPort) {
+        qdict_put(options, ARCHIPELAGO_OPT_VPORT, qint_from_int(vport));
+    }
+}
+
 static QemuOptsList archipelago_runtime_opts = {
     .name = "archipelago",
     .head = QTAILQ_HEAD_INITIALIZER(archipelago_runtime_opts.head),
@@ -768,6 +903,7 @@ static BlockDriver bdrv_archipelago = {
     .format_name         = "archipelago",
     .protocol_name       = "archipelago",
     .instance_size       = sizeof(BDRVArchipelagoState),
+    .bdrv_parse_filename = archipelago_parse_filename,
     .bdrv_file_open      = qemu_archipelago_open,
     .bdrv_close          = qemu_archipelago_close,
     .bdrv_getlength      = qemu_archipelago_getlength,
Signature · 1 line
1.7.10.4
#6 lore raw

PATCH v7 3/5 block/archipelago: Add support for creating images

In reply to Chrysostomos Nanakos

qemu-img archipelago:<volumename>[/mport=<mapperd_port>[:vport=<vlmcd_port>]
[:segment=<segment_name>]] [size]

---
 block/archipelago.c |  146 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 146 insertions(+)
block/archipelago.c +146 -0
index 5a9fc68..b5c66fd 100644
@@ -592,6 +592,137 @@ err_exit:
     xseg_leave(s->xseg);
 }
 
+static int qemu_archipelago_create_volume(Error **errp, const char *volname,
+                                          char *segment_name,
+                                          uint64_t size, xport mportno,
+                                          xport vportno)
+{
+    int ret, targetlen;
+    struct xseg *xseg = NULL;
+    struct xseg_request *req;
+    struct xseg_request_clone *xclone;
+    struct xseg_port *port;
+    xport srcport = NoPort, sport = NoPort;
+    char *target;
+
+    /* Try default values if none has been set */
+    if (mportno == (xport) -1) {
+        mportno = ARCHIPELAGO_DFL_MPORT;
+    }
+
+    if (vportno == (xport) -1) {
+        vportno = ARCHIPELAGO_DFL_VPORT;
+    }
+
+    if (xseg_initialize()) {
+        error_setg(errp, "Cannot initialize XSEG");
+        return -1;
+    }
+
+    xseg = xseg_join("posix", segment_name,
+                     "posixfd", NULL);
+
+    if (!xseg) {
+        error_setg(errp, "Cannot join XSEG shared memory segment");
+        return -1;
+    }
+
+    port = xseg_bind_dynport(xseg);
+    srcport = port->portno;
+    init_local_signal(xseg, sport, srcport);
+
+    req = xseg_get_request(xseg, srcport, mportno, X_ALLOC);
+    if (!req) {
+        error_setg(errp, "Cannot get XSEG request");
+        return -1;
+    }
+
+    targetlen = strlen(volname);
+    ret = xseg_prep_request(xseg, req, targetlen,
+                            sizeof(struct xseg_request_clone));
+    if (ret < 0) {
+        error_setg(errp, "Cannot prepare XSEG request");
+        goto err_exit;
+    }
+
+    target = xseg_get_target(xseg, req);
+    if (!target) {
+        error_setg(errp, "Cannot get XSEG target.\n");
+        goto err_exit;
+    }
+    memcpy(target, volname, targetlen);
+    xclone = (struct xseg_request_clone *) xseg_get_data(xseg, req);
+    memset(xclone->target, 0 , XSEG_MAX_TARGETLEN);
+    xclone->targetlen = 0;
+    xclone->size = size;
+    req->offset = 0;
+    req->size = req->datalen;
+    req->op = X_CLONE;
+
+    xport p = xseg_submit(xseg, req, srcport, X_ALLOC);
+    if (p == NoPort) {
+        error_setg(errp, "Could not submit XSEG request");
+        goto err_exit;
+    }
+    xseg_signal(xseg, p);
+
+    ret = wait_reply(xseg, srcport, port, req);
+    if (ret < 0) {
+        error_setg(errp, "wait_reply() error.");
+    }
+
+    xseg_put_request(xseg, req, srcport);
+    xseg_quit_local_signal(xseg, srcport);
+    xseg_leave_dynport(xseg, port);
+    xseg_leave(xseg);
+    return ret;
+
+err_exit:
+    xseg_put_request(xseg, req, srcport);
+    xseg_quit_local_signal(xseg, srcport);
+    xseg_leave_dynport(xseg, port);
+    xseg_leave(xseg);
+    return -1;
+}
+
+static int qemu_archipelago_create(const char *filename,
+                                   QemuOpts *options,
+                                   Error **errp)
+{
+    int ret = 0;
+    uint64_t total_size = 0;
+    char *volname = NULL, *segment_name = NULL;
+    const char *start;
+    xport mport = NoPort, vport = NoPort;
+
+    if (!strstart(filename, "archipelago:", &start)) {
+        error_setg(errp, "File name must start with 'archipelago:'");
+        return -1;
+    }
+
+    if (!strlen(start) || strstart(start, "/", NULL)) {
+        error_setg(errp, "volume name must be specified");
+        return -1;
+    }
+
+    parse_filename_opts(filename, errp, &volname, &segment_name, &mport,
+                        &vport);
+    total_size = qemu_opt_get_size_del(options, BLOCK_OPT_SIZE, 0);
+
+    if (segment_name == NULL) {
+        segment_name = g_strdup("archipelago");
+    }
+
+    /* Create an Archipelago volume */
+    ret = qemu_archipelago_create_volume(errp, volname, segment_name,
+                                         total_size, mport,
+                                         vport);
+
+    g_free(volname);
+    g_free(segment_name);
+    return ret;
+}
+
 static void qemu_archipelago_aio_cancel(BlockDriverAIOCB *blockacb)
 {
     ArchipelagoAIOCB *aio_cb = (ArchipelagoAIOCB *) blockacb;
@@ -892,6 +1023,19 @@ static int64_t qemu_archipelago_getlength(BlockDriverState *bs)
     return ret;
 }
 
+static QemuOptsList qemu_archipelago_create_opts = {
+    .name = "archipelago-create-opts",
+    .head = QTAILQ_HEAD_INITIALIZER(qemu_archipelago_create_opts.head),
+    .desc = {
+        {
+            .name = BLOCK_OPT_SIZE,
+            .type = QEMU_OPT_SIZE,
+            .help = "Virtual disk size"
+        },
+        { /* end of list */ }
+    }
+};
+
 static BlockDriverAIOCB *qemu_archipelago_aio_flush(BlockDriverState *bs,
         BlockDriverCompletionFunc *cb, void *opaque)
 {
@@ -906,11 +1050,13 @@ static BlockDriver bdrv_archipelago = {
     .bdrv_parse_filename = archipelago_parse_filename,
     .bdrv_file_open      = qemu_archipelago_open,
     .bdrv_close          = qemu_archipelago_close,
+    .bdrv_create         = qemu_archipelago_create,
     .bdrv_getlength      = qemu_archipelago_getlength,
     .bdrv_aio_readv      = qemu_archipelago_aio_readv,
     .bdrv_aio_writev     = qemu_archipelago_aio_writev,
     .bdrv_aio_flush      = qemu_archipelago_aio_flush,
     .bdrv_has_zero_init  = bdrv_has_zero_init_1,
+    .create_opts         = &qemu_archipelago_create_opts,
 };
 
 static void bdrv_archipelago_init(void)
Signature · 1 line
1.7.10.4
#7 lore raw

PATCH v7 4/5 QMP: Add support for Archipelago

In reply to Chrysostomos Nanakos

Introduce new enum BlockdevOptionsArchipelago.

@volume: #Name of the Archipelago volume image

@mport: #'mport' is the port number on which mapperd is
listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

@vport: #'vport' is the port number on which vlmcd is
listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

@segment: #optional The name of the shared memory segment
Archipelago stack is using. This is optional and if not specified, QEMU will make Archipelago use the default value, 'archipelago'.

---
 qapi/block-core.json |   38 +++++++++++++++++++++++++++++++++++---
 1 file changed, 35 insertions(+), 3 deletions(-)
qapi/block-core.json +35 -3
index e378653..0fa0c12 100644
@@ -190,8 +190,8 @@
 # @ro: true if the backing device was open read-only
 #
 # @drv: the name of the block format used to open the backing device. As of
-#       0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
-#       'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
+#       0.14.0 this can be: 'archipelago', 'blkdebug', 'bochs', 'cloop', 'cow',
+#       'dmg', 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
 #       'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
 #       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
 #
@@ -1143,7 +1143,7 @@
 # Since: 2.0
 ##
 { 'enum': 'BlockdevDriver',
-  'data': [ 'file', 'host_device', 'host_cdrom', 'host_floppy',
+  'data': [ 'archipelago', 'file', 'host_device', 'host_cdrom', 'host_floppy',
             'http', 'https', 'ftp', 'ftps', 'tftp', 'vvfat', 'blkdebug',
             'blkverify', 'bochs', 'cloop', 'cow', 'dmg', 'parallels', 'qcow',
             'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quorum' ] }
@@ -1273,6 +1273,37 @@
             '*pass-discard-snapshot': 'bool',
             '*pass-discard-other': 'bool' } }
 
+
+##
+# @BlockdevOptionsArchipelago
+#
+# Driver specific block device options for Archipelago.
+#
+# @volume:              Name of the Archipelago volume image
+#
+# @mport:               #optional The port number on which mapperd is
+#                       listening. This is optional
+#                       and if not specified, QEMU will make Archipelago
+#                       use the default port (1001).
+#
+# @vport:               #optional The port number on which vlmcd is
+#                       listening. This is optional
+#                       and if not specified, QEMU will make Archipelago
+#                       use the default port (501).
+#
+# @segment:             #optional The name of the shared memory segment
+#                       Archipelago stack is using. This is optional
+#                       and if not specified, QEMU will make Archipelago
+#                       use the default value, 'archipelago'.
+# Since: 2.2
+##
+{ 'type': 'BlockdevOptionsArchipelago',
+  'data': { 'volume': 'str',
+            '*mport': 'int',
+            '*vport': 'int',
+            '*segment': 'str' } }
+
+
 ##
 # @BlkdebugEvent
 #
@@ -1416,6 +1447,7 @@
   'base': 'BlockdevOptionsBase',
   'discriminator': 'driver',
   'data': {
+      'archipelago':'BlockdevOptionsArchipelago',
       'file':       'BlockdevOptionsFile',
       'host_device':'BlockdevOptionsFile',
       'host_cdrom': 'BlockdevOptionsFile',
Signature · 1 line
1.7.10.4
#8 lore raw

Re: [Qemu-devel] [PATCH v7 4/5] QMP: Add support for Archipelago

Quoted 27 lines · Chrysostomos Nanakos

Introduce new enum BlockdevOptionsArchipelago.

@volume: #Name of the Archipelago volume image

@mport: #'mport' is the port number on which mapperd is
listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

@vport: #'vport' is the port number on which vlmcd is
listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

@segment: #optional The name of the shared memory segment
Archipelago stack is using. This is optional and if not specified, QEMU will make Archipelago use the default value, 'archipelago'.

---
 qapi/block-core.json |   38 +++++++++++++++++++++++++++++++++++---
 1 file changed, 35 insertions(+), 3 deletions(-)
qapi/block-core.json +0 -0
index e378653..0fa0c12 100644

qapi/block-core.json line 196

Quoted 9 lines
qapi/block-core.json +2 -2
@@ -190,8 +190,8 @@
 # @ro: true if the backing device was open read-only
 #
 # @drv: the name of the block format used to open the backing device. As of
-#       0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
-#       'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
+#       0.14.0 this can be: 'archipelago', 'blkdebug', 'bochs', 'cloop', 'cow',
+#       'dmg', 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
 #       'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
 #       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'

This comment is wrong; 'archipelago' did not exist in 0.14.0. Please split the list into:

0.14.0 ... existing
2.2 'archipelago'

Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
#9 lore raw

PATCH v7 5/5 qemu-iotests: add support for Archipelago protocol

In reply to Chrysostomos Nanakos
---
 tests/qemu-iotests/common    |    6 ++++++
 tests/qemu-iotests/common.rc |    9 ++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)
tests/qemu-iotests/common +6 -0
index e4083f4..70df659 100644
@@ -152,6 +152,7 @@ check options
     -nbd                test nbd
     -ssh                test ssh
     -nfs                test nfs
+    -archipelago        test archipelago
     -xdiff              graphical mode diff
     -nocache            use O_DIRECT on backing file
     -misalign           misalign memory allocations
@@ -263,6 +264,11 @@ testlist options
             xpand=false
             ;;
 
+        -archipelago)
+            IMGPROTO=archipelago
+            xpand=false
+            ;;
+
         -nocache)
             CACHEMODE="none"
             CACHEMODE_IS_DEFAULT=false
tests/qemu-iotests/common.rc +8 -1
index e0ea7e3..3fd691e 100644
@@ -64,6 +64,8 @@ elif [ "$IMGPROTO" = "ssh" ]; then
 elif [ "$IMGPROTO" = "nfs" ]; then
     TEST_DIR="nfs://127.0.0.1/$TEST_DIR"
     TEST_IMG=$TEST_DIR/t.$IMGFMT
+elif [ "$IMGPROTO" = "archipelago" ]; then
+    TEST_IMG="archipelago:at.$IMGFMT"
 else
     TEST_IMG=$IMGPROTO:$TEST_DIR/t.$IMGFMT
 fi
@@ -163,7 +165,8 @@ _make_test_img()
             -e "s# lazy_refcounts=\\(on\\|off\\)##g" \
             -e "s# block_size=[0-9]\\+##g" \
             -e "s# block_state_zero=\\(on\\|off\\)##g" \
-            -e "s# log_size=[0-9]\\+##g"
+            -e "s# log_size=[0-9]\\+##g" \
+            -e "s/archipelago:a/TEST_DIR\//g"
 
     # Start an NBD server on the image file, which is what we'll be talking to
     if [ $IMGPROTO = "nbd" ]; then
@@ -206,6 +209,10 @@ _cleanup_test_img()
             rbd --no-progress rm "$TEST_DIR/t.$IMGFMT" > /dev/null
             ;;
 
+        archipelago)
+            vlmc remove "at.$IMGFMT" > /dev/null
+            ;;
+
         sheepdog)
             collie vdi delete "$TEST_DIR/t.$IMGFMT"
             ;;
Signature · 1 line
1.7.10.4
#10 lore raw
In reply to Chrysostomos Nanakos
Quoted 73 lines · Chrysostomos Nanakos

v7:
- Fix coding style issues.
- Rename __archipelago_submit_request function to archipelago_submit_request.
- Set X_NONBLOCK flag to xseg_receive().
- Return -EIO to .bdrv_getlength() if archipelago_volume_info() fails.
- Fix segment_name mem leak.
- Bump version number from 2.1 to 2.2 in qapi/block-core.json file concerning QEMU Archipelago support.
- Convert qemu_aio_wait() to aio_poll().
- Remove qemu_blockalign() and memcpy() call and use qemu_iovec_to_buf() directly.

v6:
- Split v5 1/4 patch into two different patches. First one implements QMP structured options and the second one implements bdrv_parse_filename().

v5:
- Remove useless qemu_aio_count variable from BDRVArchipelagoState struct.
- Cleanup xseg signal descriptor, call xseg_quit_local_signal() when closing block device.
- Fix ds and volname leaks.
- Make xseg request handler thread joinable and wait until exits before destroying condition variables and mutexes. Thanks to Stefan Hajnoczi for pointing this out.
- Remove error_propagate() useless call.
- Use memcpy instead of strncpy.
- Remove check after trying to allocate memory with g_malloc().
- Remove pipe code and complete AIO by introducing QEMU "bottom-half".
- Add Archipelago shared memory segment name in options list and QMP.
- Remove functions archipelago_aio_read()/_write() and introduce new and simpler function, __archipelago_submit_request().
Refactor archipelago_aio_segmented_rw() function.
- Enable Archipelago support in qemu-iotests

v4:
- Move Archipelago QMP support from qapi-schema.json file to qapi/block-core.json. Fixe various typographic errors, thanks to Kevin Wolf and Eric Blake.
- Use new .create_opts format, define new QemuOptsList structure and refactor qemu_archipelago_create function.

v3:
- Break down initial patch from one to three. First patch implements Archipelago QEMU block backend with read/write functionality. Second patch implements .bdrv_create() and adds support for creating Archipelago images. Third patch adds QMP support.
- Remove global variable g_xseg_init, make xseg_initialize(), xseg_join() and xseg_leave() reentrant and thread-safe.
- Introduce new enum BlockdevOptionsArchipelago for the QMP support.

v2:
- Implement .bdrv_parse_filename() function to convert the shortuct version with a single string to the individual options.
- Remove global variables and move relevant fields to ArchipelagoAIOCB struct.
- Remove ArchipelagoConf struct and use the relevant fields as individual arguments.
- Remove ArchipelagoCB struct and use ArchipelagoAIOCB instead.
- Remove ArchipelagoThread struct and move relevant fields to ArchipelagoAIOCB instead. Now an I/O thread is spawned for per-device to handle all async I/O requests.
- Remove double data copy, use qemu_iovec_from_buf() and copy data directly to the destination buffer.
- Remove archipelago_aio_bh_cb() function, a full request is completed in qemu_archipelago_complete_aio() instead.
- Resolve proposed changes from Kevin Wolf and miscellaneous style issues.

Chrysostomos Nanakos (5):
block: Support Archipelago as a QEMU block backend block/archipelago: Implement bdrv_parse_filename() block/archipelago: Add support for creating images
QMP: Add support for Archipelago
qemu-iotests: add support for Archipelago protocol

Quoted 9 lines
 MAINTAINERS                  |    6 +
 block/Makefile.objs          |    2 +
 block/archipelago.c          | 1064 ++++++++++++++++++++++++++++++++++++++++++
 configure                    |   40 ++
 qapi/block-core.json         |   38 +-
 tests/qemu-iotests/common    |    6 +
 tests/qemu-iotests/common.rc |    9 +-
 7 files changed, 1161 insertions(+), 4 deletions(-)
 create mode 100644 block/archipelago.c

Thanks, applied to my block-next tree:
https://github.com/stefanha/qemu/commits/block-next

Stefan

#11 lore raw

PATCH v8 4/5 QMP: Add support for Archipelago

In reply to Chrysostomos Nanakos

Introduce new enum BlockdevOptionsArchipelago.

@volume: #Name of the Archipelago volume image

@mport: #'mport' is the port number on which mapperd is
listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

@vport: #'vport' is the port number on which vlmcd is
listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

@segment: #optional The name of the shared memory segment
Archipelago stack is using. This is optional and if not specified, QEMU will make Archipelago use the default value, 'archipelago'.

---
 qapi/block-core.json |   35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)
qapi/block-core.json +34 -1
index e378653..d1c4fc2 100644
@@ -194,6 +194,7 @@
 #       'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
 #       'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
 #       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
+#       2.2: 'archipelago'
 #
 # @backing_file: #optional the name of the backing file (for copy-on-write)
 #
@@ -1143,7 +1144,7 @@
 # Since: 2.0
 ##
 { 'enum': 'BlockdevDriver',
-  'data': [ 'file', 'host_device', 'host_cdrom', 'host_floppy',
+  'data': [ 'archipelago', 'file', 'host_device', 'host_cdrom', 'host_floppy',
             'http', 'https', 'ftp', 'ftps', 'tftp', 'vvfat', 'blkdebug',
             'blkverify', 'bochs', 'cloop', 'cow', 'dmg', 'parallels', 'qcow',
             'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quorum' ] }
@@ -1273,6 +1274,37 @@
             '*pass-discard-snapshot': 'bool',
             '*pass-discard-other': 'bool' } }
 
+
+##
+# @BlockdevOptionsArchipelago
+#
+# Driver specific block device options for Archipelago.
+#
+# @volume:              Name of the Archipelago volume image
+#
+# @mport:               #optional The port number on which mapperd is
+#                       listening. This is optional
+#                       and if not specified, QEMU will make Archipelago
+#                       use the default port (1001).
+#
+# @vport:               #optional The port number on which vlmcd is
+#                       listening. This is optional
+#                       and if not specified, QEMU will make Archipelago
+#                       use the default port (501).
+#
+# @segment:             #optional The name of the shared memory segment
+#                       Archipelago stack is using. This is optional
+#                       and if not specified, QEMU will make Archipelago
+#                       use the default value, 'archipelago'.
+# Since: 2.2
+##
+{ 'type': 'BlockdevOptionsArchipelago',
+  'data': { 'volume': 'str',
+            '*mport': 'int',
+            '*vport': 'int',
+            '*segment': 'str' } }
+
+
 ##
 # @BlkdebugEvent
 #
@@ -1416,6 +1448,7 @@
   'base': 'BlockdevOptionsBase',
   'discriminator': 'driver',
   'data': {
+      'archipelago':'BlockdevOptionsArchipelago',
       'file':       'BlockdevOptionsFile',
       'host_device':'BlockdevOptionsFile',
       'host_cdrom': 'BlockdevOptionsFile',
Signature · 1 line
1.7.10.4
#12 lore raw

Re: [Qemu-devel] [PATCH v8 4/5] QMP: Add support for Archipelago

Quoted 17 lines · Chrysostomos Nanakos

Introduce new enum BlockdevOptionsArchipelago.

@volume: #Name of the Archipelago volume image

@mport: #'mport' is the port number on which mapperd is
listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

@vport: #'vport' is the port number on which vlmcd is
listening. This is optional and if not specified, QEMU will make Archipelago to use the default port.

@segment: #optional The name of the shared memory segment
Archipelago stack is using. This is optional and if not specified, QEMU will make Archipelago use the default value, 'archipelago'.

Quoted 4 lines
---
 qapi/block-core.json |   35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

Thanks, applied to my block-next tree and replaced v7 patch:
https://github.com/stefanha/qemu/commits/block-next

Stefan