mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
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
This commit is contained in:
parent
607a00d170
commit
4fc3051258
@ -17005,7 +17005,7 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm,
|
||||
goto endjob;
|
||||
|
||||
if (!mirror->format) {
|
||||
if (!reuse) {
|
||||
if (!(flags & VIR_DOMAIN_BLOCK_COPY_REUSE_EXT)) {
|
||||
mirror->format = disk->src->format;
|
||||
} else {
|
||||
/* If the user passed the REUSE_EXT flag, then either they
|
||||
|
Loading…
x
Reference in New Issue
Block a user