render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
Blob Blame History Raw
From 84b0e095a5dd885a532a4108e95adea0b5dca184 Mon Sep 17 00:00:00 2001
Message-Id: <84b0e095a5dd885a532a4108e95adea0b5dca184@dist-git>
From: Peter Krempa <pkrempa@redhat.com>
Date: Mon, 30 Mar 2020 17:21:42 +0200
Subject: [PATCH] qemuDomainSnapshotDiskPrepareOne: Don't load the relative
 path with blockdev
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Since we are refreshing the relative paths when doing the blockjobs we
no longer need to load them upfront when doing the snapshot.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 2ace7a87a8aced68c2504fd4dd4e2df4302c3eeb)
https://bugzilla.redhat.com/show_bug.cgi?id=1818655
Message-Id: <7763b0a5b018f04230220b81038e60dc12706799.1585581552.git.pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_driver.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 27a50f60ef..4701a1905e 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -15441,8 +15441,9 @@ qemuDomainSnapshotDiskPrepareOne(virQEMUDriverPtr driver,
         dd->initialized = true;
 
         /* relative backing store paths need to be updated so that relative
-         * block commit still works */
-        if (reuse) {
+         * block commit still works. With blockdev we must update it when doing
+         * commit anyways so it's skipped here */
+        if (reuse && !blockdev) {
             if (supportsBacking) {
                 g_autofree char *backingStoreStr = NULL;
 
-- 
2.26.0