From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64EA82FB1 for ; Mon, 24 May 2021 07:29:55 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 025C467373; Mon, 24 May 2021 09:29:50 +0200 (CEST) Date: Mon, 24 May 2021 09:29:50 +0200 From: Christoph Hellwig To: Hannes Reinecke Cc: Christoph Hellwig , Jens Axboe , Geert Uytterhoeven , Chris Zankel , Max Filippov , Philipp Reisner , Lars Ellenberg , Jim Paris , Philip Kelleher , Minchan Kim , Nitin Gupta , Matias Bjorling , Coly Li , Mike Snitzer , Song Liu , Maxim Levitsky , Alex Dubov , Ulf Hansson , Dan Williams , Vishal Verma , Dave Jiang , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-block@vger.kernel.org, dm-devel@redhat.com, linux-m68k@lists.linux-m68k.org, linux-xtensa@linux-xtensa.org, drbd-dev@lists.linbit.com, linuxppc-dev@lists.ozlabs.org, linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org, linux-mmc@vger.kernel.org, nvdimm@lists.linux.dev, linux-nvme@lists.infradead.org, linux-s390@vger.kernel.org Subject: Re: [PATCH 18/26] nvme-multipath: convert to blk_alloc_disk/blk_cleanup_disk Message-ID: <20210524072950.GG23890@lst.de> References: <20210521055116.1053587-1-hch@lst.de> <20210521055116.1053587-19-hch@lst.de> <1a771bf9-5083-c440-f0e1-5f6920b5b017@suse.de> X-Mailing-List: nvdimm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1a771bf9-5083-c440-f0e1-5f6920b5b017@suse.de> User-Agent: Mutt/1.5.17 (2007-11-01) On Sun, May 23, 2021 at 10:20:27AM +0200, Hannes Reinecke wrote: > What about the check for GENHD_FL_UP a bit further up in line 766? > Can this still happen with the new allocation scheme, ie is there still a > difference in lifetime between ->disk and ->disk->queue? Yes, nvme_free_ns_head can still be called before device_add_disk was called for an allocated nshead gendisk during error handling of the setup path. There is still a difference in the lifetime in that they are separately refcounted, but it does not matter to the driver.