In checkpoint callback, we wait for the interval and then start
another checkpoint, so the ERROR_TIMEDOUT should be intended
and should not treat as error.

This patch is based on
[PATCH v8 --for 4.6 COLO 00/25] COarse-grain LOck-stepping Virtual Machines for 
Non-stop Service

Signed-off-by: Yang Hongyang <yan...@cn.fujitsu.com>
CC: Ian Jackson <ian.jack...@eu.citrix.com>
CC: Ian Campbell <ian.campb...@citrix.com>
CC: Wei Liu <wei.l...@citrix.com>
---
 tools/libxl/libxl_remus.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tools/libxl/libxl_remus.c b/tools/libxl/libxl_remus.c
index 46dcc3c..ffc92a7 100644
--- a/tools/libxl/libxl_remus.c
+++ b/tools/libxl/libxl_remus.c
@@ -355,11 +355,14 @@ static void remus_next_checkpoint(libxl__egc *egc, 
libxl__ev_time *ev,
      * (xc_domain_save.c). in order to continue executing the infinite loop
      * (suspend, checkpoint, resume) in xc_domain_save().
      */
-
-    if (rc)
+    if (rc == ERROR_TIMEDOUT) {
+        /* This is intended, we set the timeout and start another checkpoint */
+        libxl__xc_domain_saverestore_async_callback_done(egc, &dss->sws.shs, 
1);
+    } else {
         dss->rc = rc;
-
-    libxl__xc_domain_saverestore_async_callback_done(egc, &dss->sws.shs, !rc);
+        libxl__xc_domain_saverestore_async_callback_done(egc,
+                                                         &dss->sws.shs, !rc);
+    }
 }
 
 /*---------------------- remus callbacks (restore) -----------------------*/
-- 
1.9.1


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

Reply via email to