|
|
a41c76 |
From 287db7fde2511199afa62af511acff4b00607c11 Mon Sep 17 00:00:00 2001
|
|
|
a41c76 |
Message-Id: <287db7fde2511199afa62af511acff4b00607c11@dist-git>
|
|
|
a41c76 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Date: Tue, 4 Feb 2020 15:07:39 +0100
|
|
|
a41c76 |
Subject: [PATCH] qemu: Fix value of 'device' argument for block-commit
|
|
|
a41c76 |
MIME-Version: 1.0
|
|
|
a41c76 |
Content-Type: text/plain; charset=UTF-8
|
|
|
a41c76 |
Content-Transfer-Encoding: 8bit
|
|
|
a41c76 |
|
|
|
a41c76 |
When using blockdev configurations the 'device' argument of
|
|
|
a41c76 |
'blockdev-commit' must correspond to the topmost node in the block node
|
|
|
a41c76 |
graph. Libvirt didn't do this properly in case when 'copy_on_read'
|
|
|
a41c76 |
option was enabled on the disk.
|
|
|
a41c76 |
|
|
|
a41c76 |
Use qemuDomainDiskGetTopNodename to fix it when calling block-commit.
|
|
|
a41c76 |
|
|
|
a41c76 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
a41c76 |
(cherry picked from commit 69908db0f62444e51bb8aae157b5ae48f45e2fe4)
|
|
|
a41c76 |
|
|
|
a41c76 |
https://bugzilla.redhat.com/show_bug.cgi?id=1792195
|
|
|
a41c76 |
Message-Id: <0e7223fc993570a108cd849e9d65c476b2294d99.1580824112.git.pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
a41c76 |
---
|
|
|
a41c76 |
src/qemu/qemu_driver.c | 2 +-
|
|
|
a41c76 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
a41c76 |
|
|
|
a41c76 |
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
|
|
a41c76 |
index 6a209ccb75..e651c9e819 100644
|
|
|
a41c76 |
--- a/src/qemu/qemu_driver.c
|
|
|
a41c76 |
+++ b/src/qemu/qemu_driver.c
|
|
|
a41c76 |
@@ -18815,7 +18815,7 @@ qemuDomainBlockCommit(virDomainPtr dom,
|
|
|
a41c76 |
jobname = job->name;
|
|
|
a41c76 |
nodetop = topSource->nodeformat;
|
|
|
a41c76 |
nodebase = baseSource->nodeformat;
|
|
|
a41c76 |
- device = disk->src->nodeformat;
|
|
|
a41c76 |
+ device = qemuDomainDiskGetTopNodename(disk);
|
|
|
a41c76 |
if (!backingPath && top_parent &&
|
|
|
a41c76 |
!(backingPath = qemuBlockGetBackingStoreString(baseSource)))
|
|
|
a41c76 |
goto endjob;
|
|
|
a41c76 |
--
|
|
|
a41c76 |
2.25.0
|
|
|
a41c76 |
|