xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wen Congyang <wency@cn.fujitsu.com>
To: xen devel <xen-devel@lists.xen.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Wen Congyang <wency@cn.fujitsu.com>
Subject: [PATCH v4 2/3] tools: change checkpointed_stream's type from int to xc_migration_stream_t
Date: Tue, 15 Mar 2016 09:58:36 +0800	[thread overview]
Message-ID: <1458007117-22697-2-git-send-email-wency@cn.fujitsu.com> (raw)
In-Reply-To: <1458007117-22697-1-git-send-email-wency@cn.fujitsu.com>

checkpointed_stream is also renamed to stream_type

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
v2->v3: Rename checkpointed_stream to stream_type
 tools/libxc/include/xenguest.h  |  8 ++++----
 tools/libxc/xc_nomigrate.c      |  4 ++--
 tools/libxc/xc_sr_restore.c     | 10 +++++-----
 tools/libxc/xc_sr_save.c        |  8 ++++----
 tools/libxl/libxl_save_helper.c | 42 ++++++++++++++++++++---------------------
 5 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/tools/libxc/include/xenguest.h b/tools/libxc/include/xenguest.h
index cf521c3..4f0b06e 100644
--- a/tools/libxc/include/xenguest.h
+++ b/tools/libxc/include/xenguest.h
@@ -86,14 +86,14 @@ typedef enum {
  * @parm xch a handle to an open hypervisor interface
  * @parm fd the file descriptor to save a domain to
  * @parm dom the id of the domain
- * @param checkpointed_stream XC_MIG_STREAM_NONE if the far end of the stream
+ * @param stream_type XC_MIG_STREAM_NONE if the far end of the stream
  *        doesn't use checkpointing
  * @return 0 on success, -1 on failure
  */
 int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iters,
                    uint32_t max_factor, uint32_t flags /* XCFLAGS_xxx */,
                    struct save_callbacks* callbacks, int hvm,
-                   int checkpointed_stream);
+                   xc_migration_stream_t stream_type);
 
 /* callbacks provided by xc_domain_restore */
 struct restore_callbacks {
@@ -121,7 +121,7 @@ struct restore_callbacks {
  * @parm hvm non-zero if this is a HVM restore
  * @parm pae non-zero if this HVM domain has PAE support enabled
  * @parm superpages non-zero to allocate guest memory with superpages
- * @parm checkpointed_stream non-zero if the far end of the stream is using checkpointing
+ * @parm stream_type non-zero if the far end of the stream is using checkpointing
  * @parm callbacks non-NULL to receive a callback to restore toolstack
  *       specific data
  * @return 0 on success, -1 on failure
@@ -131,7 +131,7 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
                       domid_t store_domid, unsigned int console_evtchn,
                       unsigned long *console_mfn, domid_t console_domid,
                       unsigned int hvm, unsigned int pae, int superpages,
-                      int checkpointed_stream,
+                      xc_migration_stream_t stream_type,
                       struct restore_callbacks *callbacks);
 
 /**
diff --git a/tools/libxc/xc_nomigrate.c b/tools/libxc/xc_nomigrate.c
index c9124df..08e1f8c 100644
--- a/tools/libxc/xc_nomigrate.c
+++ b/tools/libxc/xc_nomigrate.c
@@ -23,7 +23,7 @@
 int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iters,
                    uint32_t max_factor, uint32_t flags,
                    struct save_callbacks* callbacks, int hvm,
-                   int checkpointed_stream)
+                   xc_migration_stream_t stream_type)
 {
     errno = ENOSYS;
     return -1;
@@ -34,7 +34,7 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
                       domid_t store_domid, unsigned int console_evtchn,
                       unsigned long *console_mfn, domid_t console_domid,
                       unsigned int hvm, unsigned int pae, int superpages,
-                      int checkpointed_stream,
+                      xc_migration_stream_t stream_type,
                       struct restore_callbacks *callbacks)
 {
     errno = ENOSYS;
diff --git a/tools/libxc/xc_sr_restore.c b/tools/libxc/xc_sr_restore.c
index d4d33fd..819401d 100644
--- a/tools/libxc/xc_sr_restore.c
+++ b/tools/libxc/xc_sr_restore.c
@@ -725,7 +725,7 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
                       domid_t store_domid, unsigned int console_evtchn,
                       unsigned long *console_gfn, domid_t console_domid,
                       unsigned int hvm, unsigned int pae, int superpages,
-                      int checkpointed_stream,
+                      xc_migration_stream_t stream_type,
                       struct restore_callbacks *callbacks)
 {
     struct xc_sr_context ctx =
@@ -739,16 +739,16 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
     ctx.restore.console_domid = console_domid;
     ctx.restore.xenstore_evtchn = store_evtchn;
     ctx.restore.xenstore_domid = store_domid;
-    ctx.restore.checkpointed = checkpointed_stream;
+    ctx.restore.checkpointed = stream_type;
     ctx.restore.callbacks = callbacks;
 
     /* Sanity checks for callbacks. */
-    if ( checkpointed_stream )
+    if ( stream_type )
         assert(callbacks->checkpoint);
 
     DPRINTF("fd %d, dom %u, hvm %u, pae %u, superpages %d"
-            ", checkpointed_stream %d", io_fd, dom, hvm, pae,
-            superpages, checkpointed_stream);
+            ", stream_type %d", io_fd, dom, hvm, pae,
+            superpages, stream_type);
 
     if ( xc_domain_getinfo(xch, dom, 1, &ctx.dominfo) != 1 )
     {
diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c
index ab59673..388ae7f 100644
--- a/tools/libxc/xc_sr_save.c
+++ b/tools/libxc/xc_sr_save.c
@@ -830,7 +830,7 @@ static int save(struct xc_sr_context *ctx, uint16_t guest_type)
 int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom,
                    uint32_t max_iters, uint32_t max_factor, uint32_t flags,
                    struct save_callbacks* callbacks, int hvm,
-                   int checkpointed_stream)
+                   xc_migration_stream_t stream_type)
 {
     struct xc_sr_context ctx =
         {
@@ -842,11 +842,11 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom,
     ctx.save.callbacks = callbacks;
     ctx.save.live  = !!(flags & XCFLAGS_LIVE);
     ctx.save.debug = !!(flags & XCFLAGS_DEBUG);
-    ctx.save.checkpointed = checkpointed_stream;
+    ctx.save.checkpointed = stream_type;
 
     /* If altering migration_stream update this assert too. */
-    assert(checkpointed_stream == XC_MIG_STREAM_NONE ||
-           checkpointed_stream == XC_MIG_STREAM_REMUS);
+    assert(stream_type == XC_MIG_STREAM_NONE ||
+           stream_type == XC_MIG_STREAM_REMUS);
 
     /*
      * TODO: Find some time to better tweak the live migration algorithm.
diff --git a/tools/libxl/libxl_save_helper.c b/tools/libxl/libxl_save_helper.c
index 6bdcf13..0fd7022 100644
--- a/tools/libxl/libxl_save_helper.c
+++ b/tools/libxl/libxl_save_helper.c
@@ -246,14 +246,14 @@ int main(int argc, char **argv)
 
     if (!strcmp(mode,"--save-domain")) {
 
-        io_fd =                    atoi(NEXTARG);
-        uint32_t dom =             strtoul(NEXTARG,0,10);
-        uint32_t max_iters =       strtoul(NEXTARG,0,10);
-        uint32_t max_factor =      strtoul(NEXTARG,0,10);
-        uint32_t flags =           strtoul(NEXTARG,0,10);
-        int hvm =                  atoi(NEXTARG);
-        unsigned cbflags =         strtoul(NEXTARG,0,10);
-        int checkpointed_stream =  strtoul(NEXTARG,0,10);
+        io_fd =                             atoi(NEXTARG);
+        uint32_t dom =                      strtoul(NEXTARG,0,10);
+        uint32_t max_iters =                strtoul(NEXTARG,0,10);
+        uint32_t max_factor =               strtoul(NEXTARG,0,10);
+        uint32_t flags =                    strtoul(NEXTARG,0,10);
+        int hvm =                           atoi(NEXTARG);
+        unsigned cbflags =                  strtoul(NEXTARG,0,10);
+        xc_migration_stream_t stream_type = strtoul(NEXTARG,0,10);
         assert(!*++argv);
 
         helper_setcallbacks_save(&helper_save_callbacks, cbflags);
@@ -262,22 +262,22 @@ int main(int argc, char **argv)
         setup_signals(save_signal_handler);
 
         r = xc_domain_save(xch, io_fd, dom, max_iters, max_factor, flags,
-                           &helper_save_callbacks, hvm, checkpointed_stream);
+                           &helper_save_callbacks, hvm, stream_type);
         complete(r);
 
     } else if (!strcmp(mode,"--restore-domain")) {
 
-        io_fd =                    atoi(NEXTARG);
-        uint32_t dom =             strtoul(NEXTARG,0,10);
-        unsigned store_evtchn =    strtoul(NEXTARG,0,10);
-        domid_t store_domid =      strtoul(NEXTARG,0,10);
-        unsigned console_evtchn =  strtoul(NEXTARG,0,10);
-        domid_t console_domid =    strtoul(NEXTARG,0,10);
-        unsigned int hvm =         strtoul(NEXTARG,0,10);
-        unsigned int pae =         strtoul(NEXTARG,0,10);
-        int superpages =           strtoul(NEXTARG,0,10);
-        unsigned cbflags =         strtoul(NEXTARG,0,10);
-        int checkpointed =         strtoul(NEXTARG,0,10);
+        io_fd =                             atoi(NEXTARG);
+        uint32_t dom =                      strtoul(NEXTARG,0,10);
+        unsigned store_evtchn =             strtoul(NEXTARG,0,10);
+        domid_t store_domid =               strtoul(NEXTARG,0,10);
+        unsigned console_evtchn =           strtoul(NEXTARG,0,10);
+        domid_t console_domid =             strtoul(NEXTARG,0,10);
+        unsigned int hvm =                  strtoul(NEXTARG,0,10);
+        unsigned int pae =                  strtoul(NEXTARG,0,10);
+        int superpages =                    strtoul(NEXTARG,0,10);
+        unsigned cbflags =                  strtoul(NEXTARG,0,10);
+        xc_migration_stream_t stream_type = strtoul(NEXTARG,0,10);
         assert(!*++argv);
 
         helper_setcallbacks_restore(&helper_restore_callbacks, cbflags);
@@ -291,7 +291,7 @@ int main(int argc, char **argv)
         r = xc_domain_restore(xch, io_fd, dom, store_evtchn, &store_mfn,
                               store_domid, console_evtchn, &console_mfn,
                               console_domid, hvm, pae, superpages,
-                              checkpointed,
+                              stream_type,
                               &helper_restore_callbacks);
         helper_stub_restore_results(store_mfn,console_mfn,0);
         complete(r);
-- 
2.5.0




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-03-15  1:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-15  1:58 [PATCH v4 1/3] libxc: move migration_stream's definition to xenguest.h Wen Congyang
2016-03-15  1:58 ` Wen Congyang [this message]
2016-03-17 13:53   ` [PATCH v4 2/3] tools: change checkpointed_stream's type from int to xc_migration_stream_t Ian Jackson
2016-03-15  1:58 ` [PATCH v4 3/3] libxl: rename checkpointed_stream to stream_type Wen Congyang
2016-03-15 12:54   ` Wei Liu
2016-03-16  1:08     ` Wen Congyang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458007117-22697-2-git-send-email-wency@cn.fujitsu.com \
    --to=wency@cn.fujitsu.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    --subject='Re: [PATCH v4 2/3] tools: change checkpointed_stream'\''s type from int to xc_migration_stream_t' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).