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

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