|
|
d76c62 |
From 287db7fde2511199afa62af511acff4b00607c11 Mon Sep 17 00:00:00 2001
|
|
|
d76c62 |
Message-Id: <287db7fde2511199afa62af511acff4b00607c11@dist-git>
|
|
|
d76c62 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Date: Tue, 4 Feb 2020 15:07:39 +0100
|
|
|
d76c62 |
Subject: [PATCH] qemu: Fix value of 'device' argument for block-commit
|
|
|
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-commit' 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 when calling block-commit.
|
|
|
d76c62 |
|
|
|
d76c62 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
d76c62 |
(cherry picked from commit 69908db0f62444e51bb8aae157b5ae48f45e2fe4)
|
|
|
d76c62 |
|
|
|
d76c62 |
https://bugzilla.redhat.com/show_bug.cgi?id=1792195
|
|
|
d76c62 |
Message-Id: <0e7223fc993570a108cd849e9d65c476b2294d99.1580824112.git.pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
---
|
|
|
d76c62 |
src/qemu/qemu_driver.c | 2 +-
|
|
|
d76c62 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
d76c62 |
|
|
|
d76c62 |
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
|
|
d76c62 |
index 6a209ccb75..e651c9e819 100644
|
|
|
d76c62 |
--- a/src/qemu/qemu_driver.c
|
|
|
d76c62 |
+++ b/src/qemu/qemu_driver.c
|
|
|
d76c62 |
@@ -18815,7 +18815,7 @@ qemuDomainBlockCommit(virDomainPtr dom,
|
|
|
d76c62 |
jobname = job->name;
|
|
|
d76c62 |
nodetop = topSource->nodeformat;
|
|
|
d76c62 |
nodebase = baseSource->nodeformat;
|
|
|
d76c62 |
- device = disk->src->nodeformat;
|
|
|
d76c62 |
+ device = qemuDomainDiskGetTopNodename(disk);
|
|
|
d76c62 |
if (!backingPath && top_parent &&
|
|
|
d76c62 |
!(backingPath = qemuBlockGetBackingStoreString(baseSource)))
|
|
|
d76c62 |
goto endjob;
|
|
|
d76c62 |
--
|
|
|
d76c62 |
2.25.0
|
|
|
d76c62 |
|