mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
qemu: Fix value of 'device' argument for blockdev-mirror
When using blockdev configurations the 'device' argument of 'blockdev-mirror' must correspond to the topmost node in the block node graph. Libvirt didn't do this properly in case when 'copy_on_read' option was enabled on the disk. Use qemuDomainDiskGetTopNodename to fix it for the blockdev-mirror calls in qemuDomainBlockCopy and the non-shared-storage migration. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
0b0f389335
commit
e3137539a9
@ -18386,7 +18386,7 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm,
|
||||
|
||||
if (blockdev) {
|
||||
ret = qemuMonitorBlockdevMirror(priv->mon, job->name, true,
|
||||
disk->src->nodeformat,
|
||||
qemuDomainDiskGetTopNodename(disk),
|
||||
mirror->nodeformat, bandwidth,
|
||||
granularity, buf_size, mirror_shallow);
|
||||
} else {
|
||||
|
@ -931,7 +931,7 @@ qemuMigrationSrcNBDStorageCopyOne(virQEMUDriverPtr driver,
|
||||
|
||||
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV)) {
|
||||
jobname = diskAlias;
|
||||
sourcename = disk->src->nodeformat;
|
||||
sourcename = qemuDomainDiskGetTopNodename(disk);
|
||||
persistjob = true;
|
||||
} else {
|
||||
jobname = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user