Skip to contentSkip to conversation

Block patches

GIT PULL Applied Jeff Cody 2 participants 3 messages Apr 4, 2018 Block layer

lore
Share & tools
lore

Jeff Cody

author
#0 lore raw

The following changes since commit fd69ad866b62ca8ed4337ffee83b6d82a4e99282:

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2018-04-04 14:00:07 +0100)

are available in the git repository at:

git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request

for you to fetch changes up to bfb15b4becf2c9cf484bc3bf893a37c8f3c15cb3:

block/rbd: remove processed options from qdict (2018-04-04 12:05:13 -0400)

----------------------------------------------------------------
Regression fix for 2.12
----------------------------------------------------------------

Jeff Cody (1):
block/rbd: remove processed options from qdict

 block/rbd.c | 7 +++++++
 1 file changed, 7 insertions(+)
Signature · 1 line
2.13.6
author
#1 lore raw

[Qemu-devel] [PULL for-2.12 1/1] block/rbd: remove processed options from qdict

Commit 4bfb274 added some QAPIfication of option parsing in qemu_rbd_open(). We need to remove all the options we processed, otherwise in bdrv_open_inherit() we will think the remaining options are invalid.

(This needs to go in 2.12 to avoid a regression that prevents rbd from being opened.)

---
 block/rbd.c | 7 +++++++
 1 file changed, 7 insertions(+)
block/rbd.c +7 -0
index 5b64849dc6..c9359d0ad8 100644
@@ -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) {
Signature · 1 line
2.13.6
#2 lore raw
In reply to Jeff Cody
Quoted 16 lines · Jeff Cody

The following changes since commit fd69ad866b62ca8ed4337ffee83b6d82a4e99282:

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2018-04-04 14:00:07 +0100)

are available in the git repository at:

git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request

for you to fetch changes up to bfb15b4becf2c9cf484bc3bf893a37c8f3c15cb3:

block/rbd: remove processed options from qdict (2018-04-04 12:05:13 -0400)

----------------------------------------------------------------
Regression fix for 2.12
----------------------------------------------------------------

Quoted 5 lines

Jeff Cody (1):
block/rbd: remove processed options from qdict

 block/rbd.c | 7 +++++++
 1 file changed, 7 insertions(+)

Applied, thanks.

-- PMM