From: Peter Krempa Date: Thu, 27 Feb 2020 14:50:08 +0000 (+0100) Subject: qemuDomainBlockCopyCommon: Record updated flags to block job X-Git-Tag: v6.2.0-rc1~224 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2b6bc73774f6202e6368ea6823ce9b1cf3521f7;p=thirdparty%2Flibvirt.git qemuDomainBlockCopyCommon: Record updated flags to block job For a long time we've masked out VIR_DOMAIN_BLOCK_COPY_SHALLOW if there's no backing chain for the copied disk to simplify the code. One of the refactors of the block copy code caused that we no longer update the 'flags' variable just the local copies. This was okay until in ccd4228afff we started storing the job flags in the block job data. Given that we modify how we call qemu we also should modify @flags so that the correct value is recorded in the block job data. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ac1e1e2f8f..7c227c1e9c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17917,8 +17917,10 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm, } /* clear the _SHALLOW flag if there is only one layer */ - if (!virStorageSourceHasBacking(disk->src)) + if (!virStorageSourceHasBacking(disk->src)) { + flags &= ~VIR_DOMAIN_BLOCK_COPY_SHALLOW; mirror_shallow = false; + } if (qemuDomainBlockCopyCommonValidateUserMirrorBackingStore(mirror, mirror_shallow,