render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
a41c76
From 84b0e095a5dd885a532a4108e95adea0b5dca184 Mon Sep 17 00:00:00 2001
a41c76
Message-Id: <84b0e095a5dd885a532a4108e95adea0b5dca184@dist-git>
a41c76
From: Peter Krempa <pkrempa@redhat.com>
a41c76
Date: Mon, 30 Mar 2020 17:21:42 +0200
a41c76
Subject: [PATCH] qemuDomainSnapshotDiskPrepareOne: Don't load the relative
a41c76
 path with blockdev
a41c76
MIME-Version: 1.0
a41c76
Content-Type: text/plain; charset=UTF-8
a41c76
Content-Transfer-Encoding: 8bit
a41c76
a41c76
Since we are refreshing the relative paths when doing the blockjobs we
a41c76
no longer need to load them upfront when doing the snapshot.
a41c76
a41c76
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
a41c76
Reviewed-by: Ján Tomko <jtomko@redhat.com>
a41c76
(cherry picked from commit 2ace7a87a8aced68c2504fd4dd4e2df4302c3eeb)
a41c76
https://bugzilla.redhat.com/show_bug.cgi?id=1818655
a41c76
Message-Id: <7763b0a5b018f04230220b81038e60dc12706799.1585581552.git.pkrempa@redhat.com>
a41c76
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
a41c76
---
a41c76
 src/qemu/qemu_driver.c | 5 +++--
a41c76
 1 file changed, 3 insertions(+), 2 deletions(-)
a41c76
a41c76
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
a41c76
index 27a50f60ef..4701a1905e 100644
a41c76
--- a/src/qemu/qemu_driver.c
a41c76
+++ b/src/qemu/qemu_driver.c
a41c76
@@ -15441,8 +15441,9 @@ qemuDomainSnapshotDiskPrepareOne(virQEMUDriverPtr driver,
a41c76
         dd->initialized = true;
a41c76
 
a41c76
         /* relative backing store paths need to be updated so that relative
a41c76
-         * block commit still works */
a41c76
-        if (reuse) {
a41c76
+         * block commit still works. With blockdev we must update it when doing
a41c76
+         * commit anyways so it's skipped here */
a41c76
+        if (reuse && !blockdev) {
a41c76
             if (supportsBacking) {
a41c76
                 g_autofree char *backingStoreStr = NULL;
a41c76
 
a41c76
-- 
a41c76
2.26.0
a41c76