On Mon, Jun 12, 2017 at 12:05:12AM -0400, Jeff Cody wrote: > We need to be able to parse the 'filename' option for both rbd and iscsi, > because there may exist images in the wild that have json backing files, > that specify the filename argument. > > Marking the series as RFC at least partially for the precedence given to > arguments; as written, these patches will give preference to the 'filename' > parameter over passed options.
I tested this as follows: (1) Prepare a test image. By using the ‘qemu-img rebase -u’ option we can set the formerly correct / now incorrect backing option to an arbitrary json string of our choosing: $ qemu-img create test.img -f qcow2 10M $ qemu-img rebase -u -b 'json:{"file.driver":"rbd","file.filename":"rbd:rbd/rbd.img:mon_host=127.0.0.0"}' test.img (2) With upstream qemu: $ qemu-system-x86_64 -hda test.img qemu-system-x86_64: -hda test.img: Could not open backing file: Parameters 'pool' and 'image' are required (3) With upstream qemu + these two patches: $ ~/d/qemu/x86_64-softmmu/qemu-system-x86_64 -hda test.img [hangs and eventually reports a timeout because I don't really have a Ceph server] So I would say that these patches, superficially at least, do seem to work. Although I wasn't able to test them against a real Ceph server. Tested-by: Richard W.M. Jones <rjo...@redhat.com> Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html