From: Ian Campbell Subject: Re: [PATCH 18 of 27 v3] libxl: merge libxl__device_del into libxl__device_remove Date: Wed, 19 Oct 2011 11:36:02 +0100 Message-ID: <1319020562.3385.96.camel@zakaz.uk.xensource.com> References: <4020531a53fcb1a5579d.1318942513@cosworth.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Roger Pau =?ISO-8859-1?Q?Monn=E9?= Cc: "xen-devel@lists.xensource.com" , Ian Jackson List-Id: xen-devel@lists.xenproject.org On Wed, 2011-10-19 at 11:22 +0100, Roger Pau Monné wrote: > > + xs_watch(ctx->xsh, state_path, be_path); > > + libxl__device_destroy_tapdisk(gc, be_path); > > + > > + if (wait) { > > + struct timeval tv; > > + tv.tv_sec = LIBXL_DESTROY_TIMEOUT; > > + tv.tv_usec = 0; > > + (void)wait_for_dev_destroy(gc, &tv); > > I think we should check the return value of wait_for_dev_destroy here, > since it might timeout, and the device is not removed then, so > libxl__device_remove should return 1 in that case (whereas it always > returns 0 now in that case, even when the device is still being > watched). Sure, didn't you post such a patch recently? Ian.