]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: backup: Implement support for backup disk export name configuration
authorPeter Krempa <pkrempa@redhat.com>
Fri, 20 Dec 2019 11:33:02 +0000 (12:33 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 24 Jan 2020 12:40:48 +0000 (13:40 +0100)
Pass the exportname as configured when exporting the image via NBD and
fill it with the default if it's not configured.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_backup.c

index c47de2f4a80410516a5fa70d80eb026ff2579cab..2cc0e6ab075fba608222fb91afc6c7ee0ed62ea3 100644 (file)
@@ -548,9 +548,12 @@ qemuBackupBeginPullExportDisks(virDomainObjPtr vm,
     for (i = 0; i < ndisks; i++) {
         struct qemuBackupDiskData *dd = disks + i;
 
+        if (!dd->backupdisk->exportname)
+            dd->backupdisk->exportname = g_strdup(dd->domdisk->dst);
+
         if (qemuMonitorNBDServerAdd(priv->mon,
                                     dd->store->nodeformat,
-                                    dd->domdisk->dst,
+                                    dd->backupdisk->exportname,
                                     false,
                                     dd->incrementalBitmap) < 0)
             return -1;