From: Ian Campbell Subject: Re: [PATCH] tools: add closure to xc_domain_save switch_qemu_logdirty callback Date: Thu, 14 Oct 2010 09:17:40 +0100 Message-ID: <1287044260.2003.5491.camel@zakaz.uk.xensource.com> References: <92be1317280b14e63b38.1286899510@localhost.localdomain> <1286974006.2003.3286.camel@zakaz.uk.xensource.com> <20101013163751.GA4621@kremvax.cs.ubc.ca> <1286988667.2003.3623.camel@zakaz.uk.xensource.com> <20101013171249.GB4621@kremvax.cs.ubc.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20101013171249.GB4621@kremvax.cs.ubc.ca> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Brendan Cully Cc: "xen-devel@lists.xensource.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Wed, 2010-10-13 at 18:12 +0100, Brendan Cully wrote: > On Wednesday, 13 October 2010 at 17:51, Ian Campbell wrote: > > On Wed, 2010-10-13 at 17:37 +0100, Brendan Cully wrote: > > > On Wednesday, 13 October 2010 at 13:46, Ian Campbell wrote: > > > I could make the python bindings patch if you'd like (or you're > > > welcome to :). Just let me know when the changes have hit the tree. > > > > I took a look but I think I'd only end up breaking something, would you > > mind? > > sure, when it hits the tree. It looks like your changes will work with > the existing code until then. thanks. > > One issue which was immediately apparent on my quick glance is that the > > callback returns void but the switch_qemu_logdirty in libcheckpoint.c > > can fail. Do you think we need to propagate an error code or can that > > switch_qemu_logdirty be made to not fail (or safely ignore failure)? I > > suspect libxl's error handling in this area could be improved if there > > was error propagation here. > > Since switch_qemu_logdirty runs through xenstore and depends on a > remote response, I don't think it can be guaranteed not to > fail, or to fail safely (if the remote hasn't turned on logdirty, > checkpointing is broken). So ideally we'd propagate the error. I'll update the patch to do so and repost. > Honestly, I'm not even sure why this is a callback, except that it's > an easy way to reuse an existing xenstore handle. Shouldn't > xc_domain_save just handle this internally, like it does for non-QEMU > logdirty? Maybe that's a job for another day :) libxenctrl doesn't link against libxenstore so it can't do it itself. Ian.