From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v3 COLOPre 04/26] tools/libxl: move remus code into libxl_remus.c Date: Mon, 29 Jun 2015 16:48:43 +0100 Message-ID: <1435592923.32500.362.camel@citrix.com> References: <1435213552-10556-1-git-send-email-yanghy@cn.fujitsu.com> <1435213552-10556-5-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: <1435213552-10556-5-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.liu2@citrix.com, wency@cn.fujitsu.com, andrew.cooper3@citrix.com, yunhong.jiang@intel.com, eddie.dong@intel.com, xen-devel@lists.xen.org, guijianfeng@cn.fujitsu.com, rshriram@cs.ubc.ca, Ian Jackson List-Id: xen-devel@lists.xenproject.org On Thu, 2015-06-25 at 14:25 +0800, Yang Hongyang wrote: > Do the following things: > - There are 2 checkpoint callbacks, rename them to: > libxl__remus_domain_{save/restore}_checkpoint_callback > - Moving remus callbacks into libxl_remus.c, export following > callbacks for internal use: > * libxl__remus_domain_suspend_callback > * libxl__remus_domain_resume_callback > * libxl__remus_domain_save_checkpoint_callback > * libxl__remus_domain_restore_checkpoint_callback > - Refactoring Remus setup/teardown, introduce 2 APIs to > setup/teardown Remus: > * libxl__remus_setup > * libxl__remus_teardown > > Signed-off-by: Yang Hongyang > [...] > +/* Remus callbacks for save */ > +_hidden void libxl__remus_domain_suspend_callback(void *data); > +_hidden void libxl__remus_domain_resume_callback(void *data); At first glance having resume under save rather than under restore seemed odd, but I suppose it is just that you resume after a failed save, but on restore you just start the VM, is that the right logic? > +_hidden void libxl__remus_domain_save_checkpoint_callback(void *data); > +/* Remus callbacks for restore */ > +_hidden void libxl__remus_domain_restore_checkpoint_callback(void *data); > +/* Remus setup and teardown*/ > +_hidden void libxl__remus_setup(libxl__egc *egc, > + libxl__domain_suspend_state *dss); > +_hidden void libxl__remus_teardown(libxl__egc *egc, > + libxl__domain_suspend_state *dss, > + int rc); > > /* > * Convenience macros. > diff --git a/tools/libxl/libxl_remus.c b/tools/libxl/libxl_remus.c > new file mode 100644 > index 0000000..504cd44 > --- /dev/null > +++ b/tools/libxl/libxl_remus.c > @@ -0,0 +1,325 @@ > +/* > + * Copyright (c) 2015 FUJITSU LIMITED > + * Author Yang Hongyang Given the amount of this which is code motion I think you should also be copying the existing copyright and licenses from the files where the code originated. Ian.