From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] libxl/remus: fix the return value of the checkpoint callback Date: Wed, 15 Jul 2015 13:13:30 +0100 Message-ID: <1436962410.32371.25.camel@citrix.com> References: <1436956363-4217-1-git-send-email-yanghy@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1436956363-4217-1-git-send-email-yanghy@cn.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Yang Hongyang Cc: Wei Liu , Ian Jackson , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2015-07-15 at 18:32 +0800, Yang Hongyang wrote: > 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 Does that mean it won't apply to current staging? I think we probably want this fix ASAP rather than waiting for that series? > Signed-off-by: Yang Hongyang > CC: Ian Jackson > CC: Ian Campbell > CC: Wei Liu > --- > 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); Please wrap this (slightly) overlong line (and probably the comment too which is borderline AFAICT). > + } 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) -----------------------*/