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

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