Blame SOURCES/libvirt-qemu-backup-Implement-support-for-backup-disk-export-name-configuration.patch

d76c62
From ca5b0a17880bd76c2965e86fa6b6ee93dec204b9 Mon Sep 17 00:00:00 2001
d76c62
Message-Id: <ca5b0a17880bd76c2965e86fa6b6ee93dec204b9@dist-git>
d76c62
From: Peter Krempa <pkrempa@redhat.com>
d76c62
Date: Tue, 4 Feb 2020 15:07:41 +0100
d76c62
Subject: [PATCH] qemu: backup: Implement support for backup disk export name
d76c62
 configuration
d76c62
MIME-Version: 1.0
d76c62
Content-Type: text/plain; charset=UTF-8
d76c62
Content-Transfer-Encoding: 8bit
d76c62
d76c62
Pass the exportname as configured when exporting the image via NBD and
d76c62
fill it with the default if it's not configured.
d76c62
d76c62
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
d76c62
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
d76c62
Reviewed-by: Eric Blake <eblake@redhat.com>
d76c62
(cherry picked from commit bce4ac55f8d3df9d649c74d2f35feeaad4422028)
d76c62
d76c62
https://bugzilla.redhat.com/show_bug.cgi?id=1207659
d76c62
Message-Id: <de4d8ed67fa09ec4016bcafb818f9ab704afb305.1580824112.git.pkrempa@redhat.com>
d76c62
Reviewed-by: Ján Tomko <jtomko@redhat.com>
d76c62
---
d76c62
 src/qemu/qemu_backup.c | 5 ++++-
d76c62
 1 file changed, 4 insertions(+), 1 deletion(-)
d76c62
d76c62
diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
d76c62
index c47de2f4a8..2cc0e6ab07 100644
d76c62
--- a/src/qemu/qemu_backup.c
d76c62
+++ b/src/qemu/qemu_backup.c
d76c62
@@ -548,9 +548,12 @@ qemuBackupBeginPullExportDisks(virDomainObjPtr vm,
d76c62
     for (i = 0; i < ndisks; i++) {
d76c62
         struct qemuBackupDiskData *dd = disks + i;
d76c62
 
d76c62
+        if (!dd->backupdisk->exportname)
d76c62
+            dd->backupdisk->exportname = g_strdup(dd->domdisk->dst);
d76c62
+
d76c62
         if (qemuMonitorNBDServerAdd(priv->mon,
d76c62
                                     dd->store->nodeformat,
d76c62
-                                    dd->domdisk->dst,
d76c62
+                                    dd->backupdisk->exportname,
d76c62
                                     false,
d76c62
                                     dd->incrementalBitmap) < 0)
d76c62
             return -1;
d76c62
-- 
d76c62
2.25.0
d76c62