]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: block: Use simple backing stores string format if possible
authorPeter Krempa <pkrempa@redhat.com>
Mon, 22 Jul 2019 15:36:05 +0000 (17:36 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 25 Jul 2019 11:21:32 +0000 (13:21 +0200)
commit47a12f275263afb05015cc1884ffa69e56833810
treeba5e937a36e5c5edb8ebfefb2a3c87cddbb611ae
parent4f11a1eaf27766fae1f934b37f46902517c6d37d
qemu: block: Use simple backing stores string format if possible

In case when the backing store can be represented with something
simpler such as a URI we can use it rather than falling back to the
json: pseudo-protocol.

In cases when it's not worth it (e.g. with the old ugly NBD or RBD
strings) let's switch to json.

The function is exported as we'll need it when overwriting the ugly
strings qemu would come up with during blockjobs.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_block.c
src/qemu/qemu_block.h
tests/qemublocktestdata/imagecreate/qcow2-backing-raw-nbd.json