From: Ian Jackson Subject: Re: [PATCH v4 8/8] libxl__device_disk_local_attach: wait for state "connected" Date: Tue, 24 Apr 2012 16:18:47 +0100 Message-ID: <20374.50263.866899.407892@mariner.uk.xensource.com> References: <1335264358-20182-8-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1335264358-20182-8-git-send-email-stefano.stabellini@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: Stefano Stabellini Cc: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org Stefano Stabellini writes ("[Xen-devel] [PATCH v4 8/8] libxl__device_disk_local_attach: wait for state "connected""): > In order to make sure that the block device is available and ready to be > used, wait for state "connected" in the backend before returning. ... > Changes in v4: > - improve exit paths. ... > + if (tmpdisk->vdev != NULL) { > + rc = libxl__device_from_disk(gc, 0, tmpdisk, &device); > + if (rc < 0) > + goto out_wait_err; This still seems to have two error exit paths: > out: > if (t != XBT_NULL) > xs_transaction_end(ctx->xsh, t, 1); > return dev; > + out_wait_err: > + libxl__device_disk_local_detach(gc, tmpdisk); > + return NULL; Previously "out" was both a success and error exit path AFAICT. I really don't care very much whether you want to combine the success and error exit paths. But there should be only one error exit path. So please no "goto out__err". Ian.