All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxl/remus: fix the return value of the checkpoint callback
@ 2015-07-15 10:32 Yang Hongyang
  2015-07-15 12:13 ` Ian Campbell
  0 siblings, 1 reply; 10+ messages in thread
From: Yang Hongyang @ 2015-07-15 10:32 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, Yang Hongyang, Ian Jackson, Ian Campbell

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 <yanghy@cn.fujitsu.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Wei Liu <wei.liu2@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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-07-16 15:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-15 10:32 [PATCH] libxl/remus: fix the return value of the checkpoint callback Yang Hongyang
2015-07-15 12:13 ` Ian Campbell
2015-07-15 12:30   ` Yang Hongyang
2015-07-15 13:35   ` [PATCH] libxl: events: Do not abort remus with ERROR_TIMEOUT Ian Jackson
2015-07-15 13:45     ` Ian Campbell
2015-07-15 13:47     ` Wei Liu
2015-07-16  2:44     ` Yang Hongyang
2015-07-16 15:51       ` Ian Campbell
2015-07-15 13:37   ` [PATCH] libxl/remus: fix the return value of the checkpoint callback Ian Jackson
2015-07-16  2:45     ` Yang Hongyang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.