From: Ian Campbell Subject: Re: [PATCH 09/11] libxl: remus: mark TODOs more clearly Date: Thu, 2 Aug 2012 11:23:50 +0100 Message-ID: <1343903030.27221.124.camel@zakaz.uk.xensource.com> References: <1343838260-17725-1-git-send-email-ian.jackson@eu.citrix.com> <1343838260-17725-10-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1343838260-17725-10-git-send-email-ian.jackson@eu.citrix.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: Ian Jackson Cc: Shriram Rajagopalan , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Wed, 2012-08-01 at 17:24 +0100, Ian Jackson wrote: > Change the TODOs in the remus code to "REMUS TODO" which will make > them easier to grep for later. AIUI all of these are essential for > use of remus in production. > > Also add a new TODO and a new assert, to check rc on entry to > remus_checkpoint_dm_saved. CCing Shriram in the hops of getting some actual code here (for 4.3 most likely). > > Signed-off-by: Ian Jackson Acked-by: Ian Campbell > --- > tools/libxl/libxl_dom.c | 9 +++++---- > 1 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c > index d749983..06d5e4f 100644 > --- a/tools/libxl/libxl_dom.c > +++ b/tools/libxl/libxl_dom.c > @@ -1110,7 +1110,7 @@ int libxl__toolstack_save(uint32_t domid, uint8_t **buf, > > static int libxl__remus_domain_suspend_callback(void *data) > { > - /* TODO: Issue disk and network checkpoint reqs. */ > + /* REMUS TODO: Issue disk and network checkpoint reqs. */ > return libxl__domain_suspend_common_callback(data); > } > > @@ -1124,7 +1124,7 @@ static int libxl__remus_domain_resume_callback(void *data) > if (libxl_domain_resume(CTX, dss->domid, /* Fast Suspend */1)) > return 0; > > - /* TODO: Deal with disk. Start a new network output buffer */ > + /* REMUS TODO: Deal with disk. Start a new network output buffer */ > return 1; > } > > @@ -1151,8 +1151,9 @@ static void libxl__remus_domain_checkpoint_callback(void *data) > static void remus_checkpoint_dm_saved(libxl__egc *egc, > libxl__domain_suspend_state *dss, int rc) > { > - /* TODO: Wait for disk and memory ack, release network buffer */ > - /* TODO: make this asynchronous */ > + /* REMUS TODO: Wait for disk and memory ack, release network buffer */ > + /* REMUS TODO: make this asynchronous */ > + assert(!rc); /* REMUS TODO handle this error properly */ > usleep(dss->interval * 1000); > libxl__xc_domain_saverestore_async_callback_done(egc, &dss->shs, 1); > }