|
|
d76c62 |
From 3959e3ef365e95ee4f5e68eb1ab189d6e8cb189d Mon Sep 17 00:00:00 2001
|
|
|
d76c62 |
Message-Id: <3959e3ef365e95ee4f5e68eb1ab189d6e8cb189d@dist-git>
|
|
|
d76c62 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Date: Tue, 4 Feb 2020 15:07:38 +0100
|
|
|
d76c62 |
Subject: [PATCH] qemu: Fix value of 'device' argument for blockdev-mirror
|
|
|
d76c62 |
MIME-Version: 1.0
|
|
|
d76c62 |
Content-Type: text/plain; charset=UTF-8
|
|
|
d76c62 |
Content-Transfer-Encoding: 8bit
|
|
|
d76c62 |
|
|
|
d76c62 |
When using blockdev configurations the 'device' argument of
|
|
|
d76c62 |
'blockdev-mirror' must correspond to the topmost node in the block node
|
|
|
d76c62 |
graph. Libvirt didn't do this properly in case when 'copy_on_read'
|
|
|
d76c62 |
option was enabled on the disk.
|
|
|
d76c62 |
|
|
|
d76c62 |
Use qemuDomainDiskGetTopNodename to fix it for the blockdev-mirror calls
|
|
|
d76c62 |
in qemuDomainBlockCopy and the non-shared-storage migration.
|
|
|
d76c62 |
|
|
|
d76c62 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
d76c62 |
(cherry picked from commit e3137539a9c4af25ab085506d5467ec0847b0ecc)
|
|
|
d76c62 |
|
|
|
d76c62 |
https://bugzilla.redhat.com/show_bug.cgi?id=1792195
|
|
|
d76c62 |
Message-Id: <1b3e7edbec684588424e78ed5009bfcb0ce7e183.1580824112.git.pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
---
|
|
|
d76c62 |
src/qemu/qemu_driver.c | 2 +-
|
|
|
d76c62 |
src/qemu/qemu_migration.c | 2 +-
|
|
|
d76c62 |
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
d76c62 |
|
|
|
d76c62 |
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
|
|
d76c62 |
index 83f24d7231..6a209ccb75 100644
|
|
|
d76c62 |
--- a/src/qemu/qemu_driver.c
|
|
|
d76c62 |
+++ b/src/qemu/qemu_driver.c
|
|
|
d76c62 |
@@ -18388,7 +18388,7 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm,
|
|
|
d76c62 |
|
|
|
d76c62 |
if (blockdev) {
|
|
|
d76c62 |
ret = qemuMonitorBlockdevMirror(priv->mon, job->name, true,
|
|
|
d76c62 |
- disk->src->nodeformat,
|
|
|
d76c62 |
+ qemuDomainDiskGetTopNodename(disk),
|
|
|
d76c62 |
mirror->nodeformat, bandwidth,
|
|
|
d76c62 |
granularity, buf_size, mirror_shallow);
|
|
|
d76c62 |
} else {
|
|
|
d76c62 |
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
|
|
|
d76c62 |
index b56ccbdc3c..03f058051d 100644
|
|
|
d76c62 |
--- a/src/qemu/qemu_migration.c
|
|
|
d76c62 |
+++ b/src/qemu/qemu_migration.c
|
|
|
d76c62 |
@@ -931,7 +931,7 @@ qemuMigrationSrcNBDStorageCopyOne(virQEMUDriverPtr driver,
|
|
|
d76c62 |
|
|
|
d76c62 |
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV)) {
|
|
|
d76c62 |
jobname = diskAlias;
|
|
|
d76c62 |
- sourcename = disk->src->nodeformat;
|
|
|
d76c62 |
+ sourcename = qemuDomainDiskGetTopNodename(disk);
|
|
|
d76c62 |
persistjob = true;
|
|
|
d76c62 |
} else {
|
|
|
d76c62 |
jobname = NULL;
|
|
|
d76c62 |
--
|
|
|
d76c62 |
2.25.0
|
|
|
d76c62 |
|