qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

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

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>

+7
+7
block/rbd.c
··· 623 623 BlockdevOptionsRbd *opts = NULL; 624 624 Visitor *v; 625 625 QObject *crumpled = NULL; 626 + const QDictEntry *e; 626 627 Error *local_err = NULL; 627 628 const char *filename; 628 629 char *keypairs, *secretid; ··· 669 670 error_propagate(errp, local_err); 670 671 r = -EINVAL; 671 672 goto out; 673 + } 674 + 675 + /* Remove the processed options from the QDict (the visitor processes 676 + * _all_ options in the QDict) */ 677 + while ((e = qdict_first(options))) { 678 + qdict_del(options, e->key); 672 679 } 673 680 674 681 r = qemu_rbd_connect(&s->cluster, &s->io_ctx, opts,