]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: blockcopy: Probe image format only with VIR_DOMAIN_BLOCK_COPY_REUSE_EXT
authorPeter Krempa <pkrempa@redhat.com>
Tue, 12 Sep 2017 12:53:59 +0000 (14:53 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 12 Sep 2017 14:03:56 +0000 (16:03 +0200)
commit4fc305125833255de16d32289ae24902d670d166
treef8d32a5ed7490136eec63390e724ee4009c6ad65
parent607a00d170fe57c740d33deddb0c5028eb12b0b3
qemu: blockcopy: Probe image format only with VIR_DOMAIN_BLOCK_COPY_REUSE_EXT

Commit 703abf1d7 changed the logic so that we don't attempt to re-create
the image if it's a block device. This was done by modifying the
'reuse' variable. Unfortunately after modifying it one of the uses was
to infer whether we should probe the disk format. After changes in the
commit mentioned above we would attempt the probe if the target of the
copy is a block device and the format was not provided explicitly rather
than using the format of the disk.

Fix it by explicitly checking whether the user requested a reuse of the
disk rather than the modified boolean flag.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1490826
src/qemu/qemu_driver.c