Commit bfb15b4b authored by Jeff Cody's avatar Jeff Cody
Browse files

block/rbd: remove processed options from qdict



Commit 4bfb2741 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.)

Suggested-by: default avatarKevin Wolf <kwolf@redhat.com>
Signed-off-by: default avatarJeff Cody <jcody@redhat.com>
Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
parent fd69ad86
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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) {