Almost trivial; the trick was dealing with the fact that we're
stuck with 'unsigned long bandwidth' due to earlier design
decisions.
* src/remote/remote_protocol.x (remote_domain_block_copy_args):
New struct.
* src/remote/remote_driver.c (remote_driver): Use it.
* src/rpc/gendispatch.pl (name_to_ProcName): Cater to legacy
bandwidth type.
* src/remote_protocol-structs: Regenerate.
* src/qemu/qemu_driver.c (qemuDriver): Wire up driver callback.
---
src/qemu/qemu_driver.c | 1 +
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 12 +++++++++++-
src/remote_protocol-structs | 9 +++++++++
src/rpc/gendispatch.pl | 1 +
5 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 41b45ec..cc43631 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -13107,6 +13107,7 @@ static virDriver qemuDriver = {
.domainBlockJobSetSpeed = qemuDomainBlockJobSetSpeed, /* 0.9.4 */
.domainBlockPull = qemuDomainBlockPull, /* 0.9.4 */
.domainBlockRebase = qemuDomainBlockRebase, /* 0.9.10 */
+ .domainBlockCopy = qemuDomainBlockCopy, /* 0.9.12 */
.isAlive = qemuIsAlive, /* 0.9.8 */
.nodeSuspendForDuration = nodeSuspendForDuration, /* 0.9.8 */
.domainSetBlockIoTune = qemuDomainSetBlockIoTune, /* 0.9.8 */
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index af46384..b431779 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -5095,6 +5095,7 @@ static virDriver remote_driver = {
.domainBlockJobSetSpeed = remoteDomainBlockJobSetSpeed, /* 0.9.4 */
.domainBlockPull = remoteDomainBlockPull, /* 0.9.4 */
.domainBlockRebase = remoteDomainBlockRebase, /* 0.9.10 */
+ .domainBlockCopy = remoteDomainBlockCopy, /* 0.9.12 */
.setKeepAlive = remoteSetKeepAlive, /* 0.9.8 */
.isAlive = remoteIsAlive, /* 0.9.8 */
.nodeSuspendForDuration = remoteNodeSuspendForDuration, /* 0.9.8 */
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 2d57247..65b4a1d 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -1188,6 +1188,14 @@ struct remote_domain_block_rebase_args {
unsigned hyper bandwidth;
unsigned int flags;
};
+struct remote_domain_block_copy_args {
+ remote_nonnull_domain dom;
+ remote_nonnull_string path;
+ remote_nonnull_string dest;
+ remote_string format;
+ unsigned hyper bandwidth;
+ unsigned int flags;
+};
struct remote_domain_set_block_io_tune_args {
remote_nonnull_domain dom;
@@ -2782,7 +2790,9 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_PM_WAKEUP = 267, /* autogen autogen */
REMOTE_PROC_DOMAIN_EVENT_TRAY_CHANGE = 268, /* autogen autogen */
REMOTE_PROC_DOMAIN_EVENT_PMWAKEUP = 269, /* autogen autogen */
- REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND = 270 /* autogen autogen */
+ REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND = 270, /* autogen autogen */
+
+ REMOTE_PROC_DOMAIN_BLOCK_COPY = 271 /* autogen autogen */
/*
* Notice how the entries are grouped in sets of 10 ?
diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
index 9b2414f..dd2aa72 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -845,6 +845,14 @@ struct remote_domain_block_rebase_args {
uint64_t bandwidth;
u_int flags;
};
+struct remote_domain_block_copy_args {
+ remote_nonnull_domain dom;
+ remote_nonnull_string path;
+ remote_nonnull_string dest;
+ remote_string format;
+ uint64_t bandwidth;
+ u_int flags;
+};
struct remote_domain_set_block_io_tune_args {
remote_nonnull_domain dom;
remote_nonnull_string disk;
@@ -2192,4 +2200,5 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_EVENT_TRAY_CHANGE = 268,
REMOTE_PROC_DOMAIN_EVENT_PMWAKEUP = 269,
REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND = 270,
+ REMOTE_PROC_DOMAIN_BLOCK_COPY = 271,
};
diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
index f161ee0..e5e28e0 100755
--- a/src/rpc/gendispatch.pl
+++ b/src/rpc/gendispatch.pl
@@ -232,6 +232,7 @@ my $long_legacy = {
NodeGetInfo => { ret => { memory => 1 } },
DomainBlockPull => { arg => { bandwidth => 1 } },
DomainBlockRebase => { arg => { bandwidth => 1 } },
+ DomainBlockCopy => { arg => { bandwidth => 1 } },
DomainBlockJobSetSpeed => { arg => { bandwidth => 1 } },
DomainMigrateGetMaxSpeed => { ret => { bandwidth => 1 } },
};
--
1.7.7.6