From: Ian Jackson Subject: Re: [PATCH] libxl: add a dummy ao_how to libxl_domain_core_dump Date: Mon, 16 Apr 2012 16:50:41 +0100 Message-ID: <20364.16337.971144.457146@mariner.uk.xensource.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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 Campbell Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("[PATCH] libxl: add a dummy ao_how to libxl_domain_core_dump"): > libxl: add a dummy ao_how to libxl_domain_core_dump > > Although this function is not currently slow it may become so in the future > (this also depends somewhat on the size of the guest). Therefore arrange for > it to take an ao_how which it completes immediately. This will allow us to > make it asynchronous in the future without breaking API compatibility. ... > ret = xc_domain_dumpcore(ctx->xch, domid, filename); > if (ret<0) { > LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "core dumping domain %d to %s", > domid, filename); > - return ERROR_FAIL; > + rc = ERROR_FAIL; While you're doing that, did you want to change it to use "goto out" ? > } > - return 0; > + > + libxl__ao_complete(egc, ao, rc); > + > + return AO_INPROGRESS; Ian.