Blame SOURCES/libvirt-qemuDomainSnapshotDiskPrepareOne-Don-t-load-the-relative-path-with-blockdev.patch

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