Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752472AbdGGILF (ORCPT ); Fri, 7 Jul 2017 04:11:05 -0400 Received: from smtp.eu.citrix.com ([185.25.65.24]:4177 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752346AbdGGILD (ORCPT ); Fri, 7 Jul 2017 04:11:03 -0400 X-IronPort-AV: E=Sophos;i="5.40,321,1496102400"; d="scan'208";a="48957304" Date: Fri, 7 Jul 2017 09:10:53 +0100 From: Roger Pau =?iso-8859-1?Q?Monn=E9?= To: Vincent Legout CC: Jan Beulich , , Boris Ostrovsky , Juergen Gross , Subject: Re: [Xen-devel] [PATCH] xen-blkfront: emit KOBJ_OFFLINE uevent when detaching device Message-ID: <20170707081053.s6pocjgz3ibkkyjg@dhcp-3-128.uk.xensource.com> References: <20170704114823.pvk6323gfebioikl@bres.gandi.net> <20170704165927.c6dgitftm4v3xk7w@dhcp-3-128.uk.xensource.com> <20170705080804.j6lptyhmjguhdj47@bres.gandi.net> <595CBCB40200007800168A16@prv-mh.provo.novell.com> <20170705123715.exc4qyllpxatxpnj@bres.gandi.net> <595CFD650200007800168BF1@prv-mh.provo.novell.com> <20170705133000.ugnbckhul4xevzk5@bres.gandi.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170705133000.ugnbckhul4xevzk5@bres.gandi.net> User-Agent: NeoMutt/20170609 (1.8.3) X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL03.citrite.net (10.69.22.127) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1394 Lines: 29 On Wed, Jul 05, 2017 at 03:30:00PM +0200, Vincent Legout wrote: > On Wed, Jul 05, 2017 at 06:53:25AM -0600, Jan Beulich wrote : > > >>> On 05.07.17 at 14:37, wrote: > > > On Wed, Jul 05, 2017 at 02:17:24AM -0600, Jan Beulich wrote : > > >> >>> On 05.07.17 at 10:08, wrote: > > >> > Without the patch, blkif_release and xlvbd_release_gendisk are never > > >> > called, and no call to blk_unregister_queue is made. > > >> > > >> But isn't that what needs to be fixed then? The device should be > > >> removed once its last user goes away (which would be at the time > > >> the umount is eventually done aiui). > > > > > > You mean that block-detach should fail if the device is still mounted? > > > or find a way to wait until all the users are gone? > > > > > > I don't say that's not what should be done, but that's not what I get. > > > The device is removed after a block-detach, even if still mounted. So > > > the system is left in an unstable state without the patch. > > > > Unstable? I'd expect subsequent I/O to fail for that device, yes, but > > that's still a stable system. Are you observing anything else? > > Yes, that's what I meant by unstable, nothing else. Sorry for the > confusion. IMHO, this should behave in the same exact way as hot-unplugging a USB drive that's mounted, can you confirm that's correct? Roger.