summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-04-04 17:48:18 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-04-04 17:48:18 +0100
commitf1a639aaf2748ad3f804c4d862f570ec6473da79 (patch)
tree80af4248e0c1097dc508308db9f5e19716804162
parent74912f6dad207bfdd5bfa8c6012c364ea9405fc7 (diff)
parentbfb15b4becf2c9cf484bc3bf893a37c8f3c15cb3 (diff)
downloadfocaccia-qemu-f1a639aaf2748ad3f804c4d862f570ec6473da79.tar.gz
focaccia-qemu-f1a639aaf2748ad3f804c4d862f570ec6473da79.zip
Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging
# gpg: Signature made Wed 04 Apr 2018 17:07:57 BST
# gpg:                using RSA key BDBE7B27C0DE3057
# gpg: Good signature from "Jeffrey Cody <jcody@redhat.com>"
# gpg:                 aka "Jeffrey Cody <jeff@codyprime.org>"
# gpg:                 aka "Jeffrey Cody <codyprime@gmail.com>"
# Primary key fingerprint: 9957 4B4D 3474 90E7 9D98  D624 BDBE 7B27 C0DE 3057

* remotes/cody/tags/block-pull-request:
  block/rbd: remove processed options from qdict

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--block/rbd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/block/rbd.c b/block/rbd.c
index 5b64849dc6..c9359d0ad8 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -623,6 +623,7 @@ static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags,
     BlockdevOptionsRbd *opts = NULL;
     Visitor *v;
     QObject *crumpled = NULL;
+    const QDictEntry *e;
     Error *local_err = NULL;
     const char *filename;
     char *keypairs, *secretid;
@@ -671,6 +672,12 @@ static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags,
         goto out;
     }
 
+    /* Remove the processed options from the QDict (the visitor processes
+     * _all_ options in the QDict) */
+    while ((e = qdict_first(options))) {
+        qdict_del(options, e->key);
+    }
+
     r = qemu_rbd_connect(&s->cluster, &s->io_ctx, opts,
                          !(flags & BDRV_O_NOCACHE), keypairs, secretid, errp);
     if (r < 0) {