[PATCH v2 4/8] blockcopy: remote implementation for new API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fairly straightforward.

* src/remote/remote_protocol.x (remote_domain_block_copy_args):
New struct.
(REMOTE_PROC_DOMAIN_BLOCK_COPY): New RPC.
* src/remote/remote_driver.c (remote_driver): Wire it up.
* src/remote_protocol-structs: Regenerate.

Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
---
 src/remote/remote_driver.c   |  1 +
 src/remote/remote_protocol.x | 18 +++++++++++++++++-
 src/remote_protocol-structs  | 11 +++++++++++
 3 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 9a1d78f..98661be 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -7977,6 +7977,7 @@ static virDriver remote_driver = {
     .domainBlockJobSetSpeed = remoteDomainBlockJobSetSpeed, /* 0.9.4 */
     .domainBlockPull = remoteDomainBlockPull, /* 0.9.4 */
     .domainBlockRebase = remoteDomainBlockRebase, /* 0.9.10 */
+    .domainBlockCopy = remoteDomainBlockCopy, /* 1.2.8 */
     .domainBlockCommit = remoteDomainBlockCommit, /* 0.10.2 */
     .connectSetKeepAlive = remoteConnectSetKeepAlive, /* 0.9.8 */
     .connectIsAlive = remoteConnectIsAlive, /* 0.9.8 */
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 5c316fb..81a8603 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -124,6 +124,9 @@ const REMOTE_DOMAIN_BLOCK_IO_TUNE_PARAMETERS_MAX = 16;
 /* Upper limit on list of numa parameters. */
 const REMOTE_DOMAIN_NUMA_PARAMETERS_MAX = 16;

+/* Upper limit on block copy tunable parameters. */
+const REMOTE_DOMAIN_BLOCK_COPY_PARAMETERS_MAX = 16;
+
 /* Upper limit on list of node cpu stats. */
 const REMOTE_NODE_CPU_STATS_MAX = 16;

@@ -1281,6 +1284,13 @@ 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 destxml;
+    remote_typed_param params<REMOTE_DOMAIN_BLOCK_COPY_PARAMETERS_MAX>;
+    unsigned int flags;
+};
 struct remote_domain_block_commit_args {
     remote_nonnull_domain dom;
     remote_nonnull_string disk;
@@ -5420,5 +5430,11 @@ enum remote_procedure {
      * @generate: both
      * @acl: connect:write
      */
-    REMOTE_PROC_CONNECT_GET_DOMAIN_CAPABILITIES = 342
+    REMOTE_PROC_CONNECT_GET_DOMAIN_CAPABILITIES = 342,
+
+    /**
+     * @generate: both
+     * @acl: domain:block_write
+     */
+    REMOTE_PROC_DOMAIN_BLOCK_COPY = 343
 };
diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
index 9bf09b8..0693916 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -916,6 +916,16 @@ 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      destxml;
+        struct {
+                u_int              params_len;
+                remote_typed_param * params_val;
+        } params;
+        u_int                      flags;
+};
 struct remote_domain_block_commit_args {
         remote_nonnull_domain      dom;
         remote_nonnull_string      disk;
@@ -2862,4 +2872,5 @@ enum remote_procedure {
         REMOTE_PROC_NODE_GET_FREE_PAGES = 340,
         REMOTE_PROC_NETWORK_GET_DHCP_LEASES = 341,
         REMOTE_PROC_CONNECT_GET_DOMAIN_CAPABILITIES = 342,
+        REMOTE_PROC_DOMAIN_BLOCK_COPY = 343,
 };
-- 
1.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]