Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_backup.c | 2 +- src/qemu/qemu_block.c | 10 +--------- src/qemu/qemu_block.h | 1 - src/qemu/qemu_migration.c | 2 +- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index d2a5d2db5f..b90185a375 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -536,7 +536,7 @@ qemuBackupBeginPullExportDisks(virDomainObj *vm, if (!dd->backupdisk->exportname) dd->backupdisk->exportname = g_strdup(dd->domdisk->dst); - if (qemuBlockExportAddNBD(vm, NULL, + if (qemuBlockExportAddNBD(vm, dd->store, dd->backupdisk->exportname, false, diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 81c807660f..141bf1b3e7 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -3534,21 +3534,18 @@ qemuBlockExportGetNBDProps(const char *nodename, /** * qemuBlockExportAddNBD: * @vm: domain object - * @drivealias: (optional) alias of -drive to export in pre-blockdev configurations * @src: disk source to export * @exportname: name for the export * @writable: whether the NBD export allows writes * @bitmap: (optional) block dirty bitmap to export along * * This function automatically selects the proper invocation of exporting a - * block backend via NBD in qemu. This includes use of nodename for blockdev - * and proper configuration for the exportname for older qemus. + * block backend via NBD in qemu. * * This function must be called while in the monitor context. */ int qemuBlockExportAddNBD(virDomainObj *vm, - const char *drivealias, virStorageSource *src, const char *exportname, bool writable, @@ -3558,11 +3555,6 @@ qemuBlockExportAddNBD(virDomainObj *vm, g_autoptr(virJSONValue) nbdprops = NULL; const char *bitmaps[2] = { bitmap, NULL }; - /* older qemu versions didn't support configuring the exportname and - * took the 'drivealias' as the export name */ - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV)) - return qemuMonitorNBDServerAdd(priv->mon, drivealias, NULL, writable, NULL); - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCK_EXPORT_ADD)) return qemuMonitorNBDServerAdd(priv->mon, src->nodeformat, exportname, writable, bitmap); diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h index bcd3f5960b..b22a541797 100644 --- a/src/qemu/qemu_block.h +++ b/src/qemu/qemu_block.h @@ -291,7 +291,6 @@ qemuBlockExportGetNBDProps(const char *nodename, int qemuBlockExportAddNBD(virDomainObj *vm, - const char *drivealias, virStorageSource *src, const char *exportname, bool writable, diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 16d65ff22e..a6d097c304 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -614,7 +614,7 @@ qemuMigrationDstStartNBDServer(virQEMUDriver *driver, server_started = true; } - if (qemuBlockExportAddNBD(vm, diskAlias, disk->src, diskAlias, true, NULL) < 0) + if (qemuBlockExportAddNBD(vm, disk->src, diskAlias, true, NULL) < 0) goto exit_monitor; qemuDomainObjExitMonitor(vm); } -- 2.36.1