Skip to contentSkip to conversation

Support Archipelago as a QEMU block backend

PATCH Superseded Chrysostomos Nanakos 3 participants 8 messages Jun 4, 2014 Block layer

v3 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v3 cover Support Archipelago as a QEMU block backend

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 (3):
block: Support Archipelago as a QEMU block backend block/archipelago: Add support for creating images
QMP: Add support for Archipelago

 MAINTAINERS         |    5 +
 block/Makefile.objs |    1 +
 block/archipelago.c | 1166 +++++++++++++++++++++++++++++++++++++++++++++++++++
 configure           |   40 ++
 qapi-schema.json    |   31 +-
 5 files changed, 1241 insertions(+), 2 deletions(-)
 create mode 100644 block/archipelago.c
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v3 1/3 block: Support Archipelago as a QEMU block backend

VM Image on Archipelago volume is specified like this:

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

or

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

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

Examples:

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

or

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

---
 MAINTAINERS         |    5 +
 block/Makefile.objs |    1 +
 block/archipelago.c | 1030 +++++++++++++++++++++++++++++++++++++++++++++++++++
 configure           |   40 ++
 4 files changed, 1076 insertions(+)
 create mode 100644 block/archipelago.c
MAINTAINERS +5 -0
index 51a6f51..11f4abf 100644
@@ -984,3 +984,8 @@ SSH
 M: Richard W.M. Jones <[email protected]>
 S: Supported
 F: block/ssh.c
+
+ARCHIPELAGO
+M: Chrysostomos Nanakos <[email protected]>
+S: Maintained
+F: block/archipelago.c
block/Makefile.objs +1 -0
index fd88c03..895c30d 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
 
block/archipelago.c new file +1030 -0

1,030 lines not on this page · raw message

configure +40 -0
index 0e516f9..9c738a0 100755
@@ -317,6 +317,7 @@ seccomp=""
 glusterfs=""
 glusterfs_discard="no"
 glusterfs_zerofill="no"
+archipelago=""
 virtio_blk_data_plane=""
 gtk=""
 gtkabi=""
@@ -1062,6 +1063,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"
@@ -1351,6 +1356,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]
   --enable-tpm             enable TPM support
@@ -3008,6 +3015,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
@@ -4197,6 +4231,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"
@@ -4631,6 +4666,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 v3 2/3 block/archipelago: Add support for creating images

In reply to Chrysostomos Nanakos

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

---
 block/archipelago.c |  136 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 136 insertions(+)
block/archipelago.c +136 -0
index 5a678ed..d05fa2f 100644
@@ -573,6 +573,131 @@ err_exit:
     xseg_leave(s->xseg);
 }
 
+static int qemu_archipelago_create_volume(Error **errp, const char *volname,
+                                          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 = 1001;
+    }
+
+    if (vportno == (xport) -1) {
+        vportno = 501;
+    }
+
+    if (xseg_initialize()) {
+        error_setg(errp, "Cannot initialize XSEG");
+        return -1;
+    }
+
+    xseg = xseg_join((char *)"posix", (char *)"archipelago",
+                     (char *)"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;
+    }
+    strncpy(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 * BDRV_SECTOR_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_leave_dynport(xseg, port);
+    xseg_leave(xseg);
+    return ret;
+
+err_exit:
+    xseg_put_request(xseg, req, srcport);
+    xseg_leave_dynport(xseg, port);
+    xseg_leave(xseg);
+    return -1;
+}
+
+static int qemu_archipelago_create(const char *filename,
+                                   QEMUOptionParameter *options,
+                                   Error **errp)
+{
+    int ret = 0;
+    uint64_t total_size = 0;
+    char *volname = 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, &mport, &vport);
+
+    while (options && options->name) {
+        if (!strcmp(options->name, BLOCK_OPT_SIZE)) {
+            total_size = options->value.n / BDRV_SECTOR_SIZE;
+        }
+        options++;
+    }
+    /* Create an Archipelago volume */
+    ret = qemu_archipelago_create_volume(errp, volname, total_size, mport,
+                                         vport);
+    g_free(volname);
+    return ret;
+}
+
 static void qemu_archipelago_aio_cancel(BlockDriverAIOCB *blockacb)
 {
     ArchipelagoAIOCB *aio_cb = (ArchipelagoAIOCB *) blockacb;
@@ -1001,6 +1126,15 @@ static int64_t qemu_archipelago_getlength(BlockDriverState *bs)
     return ret;
 }
 
+static QEMUOptionParameter qemu_archipelago_create_options[] = {
+    {
+        .name = BLOCK_OPT_SIZE,
+        .type = OPT_SIZE,
+        .help = "Virtual disk size"
+    },
+    {NULL}
+};
+
 static BlockDriverAIOCB *qemu_archipelago_aio_flush(BlockDriverState *bs,
         BlockDriverCompletionFunc *cb, void *opaque)
 {
@@ -1015,11 +1149,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_options      = qemu_archipelago_create_options,
 };
 
 static void bdrv_archipelago_init(void)
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH v3 3/3 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.

---
 qapi-schema.json |   31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)
qapi-schema.json +29 -2
index 7bc33ea..eef4a11 100644
@@ -931,7 +931,7 @@
 #       0.14.0 this can be: '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'
+#       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat', 'archipelago'
 #
 # @backing_file: #optional the name of the backing file (for copy-on-write)
 #
@@ -4317,7 +4317,8 @@
   'data': [ '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' ] }
+            'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quorum',
+            'archipelago' ] }
 
 ##
 # @BlockdevOptionsBase
@@ -4444,6 +4445,31 @@
             '*pass-discard-snapshot': 'bool',
             '*pass-discard-other': 'bool' } }
 
+
+##
+# @BlockdevOptionsArchipelago
+#
+# Driver specific block device options for Archipelago.
+#
+# @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.
+# Since: 2.0
+##
+{ 'type': 'BlockdevOptionsArchipelago',
+  'data': { 'volume': 'str',
+            '*mport': 'int',
+            '*vport': 'int' } }
+
 ##
 # @BlkdebugEvent
 #
@@ -4616,6 +4642,7 @@
       'vhdx':       'BlockdevOptionsGenericFormat',
       'vmdk':       'BlockdevOptionsGenericCOWFormat',
       'vpc':        'BlockdevOptionsGenericFormat',
+      'archipelago': 'BlockdevOptionsArchipelago',
       'quorum':     'BlockdevOptionsQuorum'
   } }
 
Signature · 1 line
1.7.10.4
#4 lore raw

Re: [Qemu-devel] [PATCH 3/3] QMP: Add support for Archipelago

Am 04.06.2014 um 13:30 hat Chrysostomos Nanakos geschrieben:

Quoted 53 lines

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.

---
 qapi-schema.json |   31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)
qapi-schema.json +12 -2
index 7bc33ea..eef4a11 100644
@@ -931,7 +931,7 @@
 #       0.14.0 this can be: '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'
+#       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat', 'archipelago'
 #
 # @backing_file: #optional the name of the backing file (for copy-on-write)
 #
@@ -4317,7 +4317,8 @@
   'data': [ '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' ] }
+            'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quorum',
+            'archipelago' ] }
 
 ##
 # @BlockdevOptionsBase
@@ -4444,6 +4445,31 @@
             '*pass-discard-snapshot': 'bool',
             '*pass-discard-other': 'bool' } }
 
+
+##
+# @BlockdevOptionsArchipelago
+#
+# Driver specific block device options for Archipelago.
+#
+# @volume:              #Name of the Archipelago volume image
+#
+#

qapi-schema.json line 4466

Quoted 10 lines
qapi-schema.json +10 -0
+# @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.
+# Since: 2.0

Not really. :-)

If you fix this to say "2.1", you can add my Reviewed-by to this patch.

Quoted 10 lines
qapi-schema.json +6 -0
+##
+{ 'type': 'BlockdevOptionsArchipelago',
+  'data': { 'volume': 'str',
+            '*mport': 'int',
+            '*vport': 'int' } }
+
 ##
 # @BlkdebugEvent
 #

qapi-schema.json line 4647

Quoted 6 lines
qapi-schema.json +1 -0
@@ -4616,6 +4642,7 @@
       'vhdx':       'BlockdevOptionsGenericFormat',
       'vmdk':       'BlockdevOptionsGenericCOWFormat',
       'vpc':        'BlockdevOptionsGenericFormat',
+      'archipelago': 'BlockdevOptionsArchipelago',
       'quorum':     'BlockdevOptionsQuorum'
   } }

I believe this list was once sorted alphabetically, once for protocols and then for image formats. archipelago would then go to the very top.

Kevin

#5 lore raw

Re: [Qemu-devel] [PATCH 3/3] QMP: Add support for Archipelago

Quoted 66 lines · Kevin Wolf

Am 04.06.2014 um 13:30 hat Chrysostomos Nanakos geschrieben:

Quoted 53 lines

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.

---
  qapi-schema.json |   31 +++++++++++++++++++++++++++++--
  1 file changed, 29 insertions(+), 2 deletions(-)
qapi-schema.json +12 -2
index 7bc33ea..eef4a11 100644
@@ -931,7 +931,7 @@
  #       0.14.0 this can be: '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'
+#       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat', 'archipelago'
  #
  # @backing_file: #optional the name of the backing file (for copy-on-write)
  #
@@ -4317,7 +4317,8 @@
    'data': [ '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' ] }
+            'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quorum',
+            'archipelago' ] }
 
  ##
  # @BlockdevOptionsBase
@@ -4444,6 +4445,31 @@
              '*pass-discard-snapshot': 'bool',
              '*pass-discard-other': 'bool' } }
 
+
+##
+# @BlockdevOptionsArchipelago
+#
+# Driver specific block device options for Archipelago.
+#
+# @volume:              #Name of the Archipelago volume image
+#
+#

qapi-schema.json line 4466

Quoted 10 lines
qapi-schema.json +10 -0
+# @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.
+# Since: 2.0

Not really. :-)

Quoted 1 line

If you fix this to say "2.1", you can add my Reviewed-by to this patch.

Fixed for v4 series.

Quoted 20 lines
Quoted 11 lines
qapi-schema.json +6 -0
+##
+{ 'type': 'BlockdevOptionsArchipelago',
+  'data': { 'volume': 'str',
+            '*mport': 'int',
+            '*vport': 'int' } }
+
  ##
  # @BlkdebugEvent
  #

qapi-schema.json line 4647

Quoted 6 lines
qapi-schema.json +1 -0
@@ -4616,6 +4642,7 @@
        'vhdx':       'BlockdevOptionsGenericFormat',
        'vmdk':       'BlockdevOptionsGenericCOWFormat',
        'vpc':        'BlockdevOptionsGenericFormat',
+      'archipelago': 'BlockdevOptionsArchipelago',
        'quorum':     'BlockdevOptionsQuorum'
    } }

I believe this list was once sorted alphabetically, once for protocols and then for image formats. archipelago would then go to the very top.

Quoted 1 line

Kevin

Fixed also for v4 series.

#6 lore raw

Re: [Qemu-devel] [PATCH 3/3] QMP: Add support for Archipelago

In reply to Chrysostomos Nanakos
Quoted 18 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.

---
 qapi-schema.json |   31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

qapi-schema.json line 4455

Quoted 8 lines
qapi-schema.json +8 -0
+
+##
+# @BlockdevOptionsArchipelago
+#
+# Driver specific block device options for Archipelago.
+#
+# @volume:              #Name of the Archipelago volume image
+#

s/#Name/Name/ (we only use # for the initial comment, and for the special marking '#optional' that designates when a parameter is optional)

qapi-schema.json line 4460

Quoted 5 lines
qapi-schema.json +5 -0
+#
+# @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.

@mport: #optional The port number ...

s/to use/use/

qapi-schema.json line 4465

Quoted 5 lines
qapi-schema.json +5 -0
+#
+# @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.

@vport: #optional The port number...

s/to use/use/

Quoted 1 line

+# Since: 2.0

2.1

Quoted 18 lines
qapi-schema.json +7 -0
+##
+{ 'type': 'BlockdevOptionsArchipelago',
+  'data': { 'volume': 'str',
+            '*mport': 'int',
+            '*vport': 'int' } }
+
 ##
 # @BlkdebugEvent
 #
@@ -4616,6 +4642,7 @@
       'vhdx':       'BlockdevOptionsGenericFormat',
       'vmdk':       'BlockdevOptionsGenericCOWFormat',
       'vpc':        'BlockdevOptionsGenericFormat',
+      'archipelago': 'BlockdevOptionsArchipelago',
       'quorum':     'BlockdevOptionsQuorum'
   } }
 
Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
#7 lore raw

Re: [Qemu-devel] [PATCH 3/3] QMP: Add support for Archipelago

Quoted 61 lines · Eric Blake
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.

---
  qapi-schema.json |   31 +++++++++++++++++++++++++++++--
  1 file changed, 29 insertions(+), 2 deletions(-)

qapi-schema.json line 4455

Quoted 8 lines
qapi-schema.json +8 -0
+
+##
+# @BlockdevOptionsArchipelago
+#
+# Driver specific block device options for Archipelago.
+#
+# @volume:              #Name of the Archipelago volume image
+#

s/#Name/Name/ (we only use # for the initial comment, and for the special marking '#optional' that designates when a parameter is optional)

qapi-schema.json line 4460

Quoted 5 lines
qapi-schema.json +5 -0
+#
+# @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.

@mport: #optional The port number ...

s/to use/use/

qapi-schema.json line 4465

Quoted 5 lines
qapi-schema.json +5 -0
+#
+# @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.

@vport: #optional The port number...

s/to use/use/

Quoted 1 line

+# Since: 2.0

2.1

Quoted 10 lines
qapi-schema.json +6 -0
+##
+{ 'type': 'BlockdevOptionsArchipelago',
+  'data': { 'volume': 'str',
+            '*mport': 'int',
+            '*vport': 'int' } }
+
  ##
  # @BlkdebugEvent
  #
@@ -4616,6 +4642,7 @@
Quoted 8 lines

qapi-schema.json line 4648

Quoted 8 lines
qapi-schema.json +1 -0
        'vhdx':       'BlockdevOptionsGenericFormat',
        'vmdk':       'BlockdevOptionsGenericCOWFormat',
        'vpc':        'BlockdevOptionsGenericFormat',
+      'archipelago': 'BlockdevOptionsArchipelago',
        'quorum':     'BlockdevOptionsQuorum'
    } }
 

Fixed everything for v4 series.

Thanks!