mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
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>
This commit is contained in:
parent
b5e7460b23
commit
805b4aa2e9
@ -18550,10 +18550,12 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm,
|
||||
* new image must refer to it in the metadata */
|
||||
mirrorBacking = disk->src->backingStore;
|
||||
}
|
||||
} else {
|
||||
mirrorBacking = mirror->backingStore;
|
||||
}
|
||||
|
||||
if (!(crdata = qemuBuildStorageSourceChainAttachPrepareBlockdevTop(mirror,
|
||||
mirror->backingStore,
|
||||
mirrorBacking,
|
||||
priv->qemuCaps)))
|
||||
goto endjob;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user