From: Michal Privoznik <mprivozn(a)redhat.com>
The virDomainMigratePerform() API declares its last argument as
'bandwidth', though throughout various typedefs, RPC and callback
implementations the name is changed to 'resource'. This creates a
confusing. Unify the name.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/driver-hypervisor.h | 2 +-
src/libvirt_internal.h | 2 +-
src/qemu/qemu_driver.c | 4 ++--
src/qemu/qemu_migration.c | 12 ++++++------
src/remote/remote_protocol.x | 2 +-
src/remote_protocol-structs | 2 +-
src/rpc/gendispatch.pl | 2 +-
7 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/driver-hypervisor.h b/src/driver-hypervisor.h
index fa2c08391f..65c20cbb74 100644
--- a/src/driver-hypervisor.h
+++ b/src/driver-hypervisor.h
@@ -593,7 +593,7 @@ typedef int
const char *uri,
unsigned long flags,
const char *dname,
- unsigned long resource);
+ unsigned long bandwidth);
typedef virDomainPtr
(*virDrvDomainMigrateFinish)(virConnectPtr dconn,
diff --git a/src/libvirt_internal.h b/src/libvirt_internal.h
index c532218226..aead4dbfb6 100644
--- a/src/libvirt_internal.h
+++ b/src/libvirt_internal.h
@@ -153,7 +153,7 @@ int virDomainMigratePerform (virDomainPtr domain,
const char *uri,
unsigned long flags,
const char *dname,
- unsigned long resource);
+ unsigned long bandwidth);
virDomainPtr virDomainMigrateFinish (virConnectPtr dconn,
const char *dname,
const char *cookie,
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index b3b0ee66f8..a531bdc581 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -10863,7 +10863,7 @@ qemuDomainMigratePerform(virDomainPtr dom,
const char *uri,
unsigned long flags,
const char *dname,
- unsigned long resource)
+ unsigned long bandwidth)
{
virQEMUDriver *driver = dom->conn->privateData;
virDomainObj *vm = NULL;
@@ -10904,7 +10904,7 @@ qemuDomainMigratePerform(virDomainPtr dom,
NULL,
migParams, cookie, cookielen,
NULL, NULL, /* No output cookies in v2 */
- flags, dname, resource, false);
+ flags, dname, bandwidth, false);
cleanup:
virDomainObjEndAPI(&vm);
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 2400750ee4..38ffcdf428 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -6447,7 +6447,7 @@ qemuMigrationSrcPerform(virQEMUDriver *driver,
int *cookieoutlen,
unsigned int flags,
const char *dname,
- unsigned long resource,
+ unsigned long bandwidth,
bool v3proto)
{
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
@@ -6457,12 +6457,12 @@ qemuMigrationSrcPerform(virQEMUDriver *driver,
"migrate_disks=%p, nbdPort=%d, "
"nbdURI=%s, "
"cookiein=%s, cookieinlen=%d, cookieout=%p, cookieoutlen=%p, "
- "flags=0x%x, dname=%s, resource=%lu, v3proto=%d",
+ "flags=0x%x, dname=%s, bandwidth=%lu, v3proto=%d",
driver, conn, vm, NULLSTR(xmlin), NULLSTR(dconnuri),
NULLSTR(uri), NULLSTR(graphicsuri), NULLSTR(listenAddress),
migrate_disks, nbdPort, NULLSTR(nbdURI),
NULLSTR(cookiein), cookieinlen, cookieout, cookieoutlen,
- flags, NULLSTR(dname), resource, v3proto);
+ flags, NULLSTR(dname), bandwidth, v3proto);
if (cfg->migrateTLSForce &&
!(flags & VIR_MIGRATE_TUNNELLED) &&
@@ -6485,7 +6485,7 @@ qemuMigrationSrcPerform(virQEMUDriver *driver,
nbdURI, migParams,
cookiein, cookieinlen,
cookieout, cookieoutlen,
- flags, dname, resource, v3proto);
+ flags, dname, bandwidth, v3proto);
}
if (dconnuri) {
@@ -6501,7 +6501,7 @@ qemuMigrationSrcPerform(virQEMUDriver *driver,
migParams,
cookiein, cookieinlen,
cookieout, cookieoutlen,
- flags, resource, nbdURI);
+ flags, bandwidth, nbdURI);
}
return qemuMigrationSrcPerformJob(driver, conn, vm, xmlin, persist_xml, NULL,
@@ -6510,7 +6510,7 @@ qemuMigrationSrcPerform(virQEMUDriver *driver,
nbdURI, migParams,
cookiein, cookieinlen,
cookieout, cookieoutlen, flags,
- dname, resource, v3proto);
+ dname, bandwidth, v3proto);
}
static int
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 2dc0a6fea6..9210c0dc1c 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -1069,7 +1069,7 @@ struct remote_domain_migrate_perform_args {
remote_nonnull_string uri;
unsigned hyper flags;
remote_string dname;
- unsigned hyper resource;
+ unsigned hyper bandwidth;
};
struct remote_domain_migrate_finish_args {
diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
index 50fcdaa134..5c30e9d107 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -646,7 +646,7 @@ struct remote_domain_migrate_perform_args {
remote_nonnull_string uri;
uint64_t flags;
remote_string dname;
- uint64_t resource;
+ uint64_t bandwidth;
};
struct remote_domain_migrate_finish_args {
remote_nonnull_string dname;
diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
index 2b7fd657cb..fc8e7e8891 100755
--- a/src/rpc/gendispatch.pl
+++ b/src/rpc/gendispatch.pl
@@ -403,7 +403,7 @@ my $long_legacy = {
DomainMigrateFinish2 => { arg => { flags => 1 } },
DomainMigrateFinish3 => { arg => { flags => 1 } },
DomainMigratePeer2Peer => { arg => { flags => 1, resource => 1 } },
- DomainMigratePerform => { arg => { flags => 1, resource => 1 } },
+ DomainMigratePerform => { arg => { flags => 1, bandwidth => 1 }
},
DomainMigratePerform3 => { arg => { flags => 1, resource => 1 } },
DomainMigratePrepare => { arg => { flags => 1, bandwidth => 1 }
},
DomainMigratePrepare2 => { arg => { flags => 1, resource => 1 } },
--
2.49.0