]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: driver: Fix shallow non-reuse block copy
authorPeter Krempa <pkrempa@redhat.com>
Tue, 3 Sep 2019 12:26:20 +0000 (14:26 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 6 Sep 2019 06:12:21 +0000 (08:12 +0200)
commit805b4aa2e9cd782072ba179939ea12872e5cee2b
tree9c9c2684975ff47ed331945b407f8d9aba692169
parentb5e7460b234c9c1972cbde375701813609b4ca0c
qemu: driver: Fix shallow non-reuse block copy

The code preparing data for creating/attaching the target image of block
copy didn't use the correct reference to the existing backing chain in
case when the copy should inherit it. This meant that qemu actually
opened a second copy of the chain and operated on that.

This would de-sync qemu from libvirt's view of node names. Luckily this
is only hypothetical at this point since it happens only when -blockdev
is enabled.

Fix it by passing 'mirrorBacking' which has the proper data as the
backing store when calling
qemuBuildStorageSourceChainAttachPrepareBlockdevTop.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_driver.c