Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752799AbdGEMhT (ORCPT ); Wed, 5 Jul 2017 08:37:19 -0400 Received: from mail4.gandi.net ([217.70.183.210]:38295 "EHLO gandi.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752634AbdGEMhS (ORCPT ); Wed, 5 Jul 2017 08:37:18 -0400 X-Spam-Flag: NO X-Spam-Score: -101.556 Date: Wed, 5 Jul 2017 14:37:15 +0200 From: Vincent Legout To: Jan Beulich Cc: Roger Pau =?utf-8?B?TW9ubsOp?= , xen-devel@lists.xenproject.org, Boris Ostrovsky , Juergen Gross , linux-kernel@vger.kernel.org Subject: Re: [Xen-devel] [PATCH] xen-blkfront: emit KOBJ_OFFLINE uevent when detaching device Message-ID: <20170705123715.exc4qyllpxatxpnj@bres.gandi.net> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <595CBCB40200007800168A16@prv-mh.provo.novell.com> User-Agent: NeoMutt/20170306 (1.8.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 905 Lines: 21 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. I also just saw the --force option of xl block-detach, but from a quick look it seems this option was actually only in xm and never in xl. Vincent