On Fri, Dec 20, 2019 at 3:27 PM Peter Krempa <pkrempa(a)redhat.com> wrote:
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(a)redhat.com>
---
src/qemu/qemu_backup.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
index 3bac6b353c..54e726ca4a 100644
--- a/src/qemu/qemu_backup.c
+++ b/src/qemu/qemu_backup.c
@@ -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)
It is a little strange that we set dd->backupdisk->exportname here, just before
we call qemu.
I think it would be cleaner if we configure dd-backupdisk-exportname after
parsing the xml, or never, sending the value from dd->domdisk->dst.
Otherwise looks fine.
return -1;
--
2.23.0
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list