From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84921C64E7C for ; Thu, 26 Nov 2020 08:16:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D40FA20872 for ; Thu, 26 Nov 2020 08:16:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D40FA20872 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 252F36B006E; Thu, 26 Nov 2020 03:16:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2054E6B0070; Thu, 26 Nov 2020 03:16:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 11A096B0071; Thu, 26 Nov 2020 03:16:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0070.hostedemail.com [216.40.44.70]) by kanga.kvack.org (Postfix) with ESMTP id F13096B006E for ; Thu, 26 Nov 2020 03:16:54 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B2D423633 for ; Thu, 26 Nov 2020 08:16:54 +0000 (UTC) X-FDA: 77525863548.25.cub70_010b2682737d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id 8D3271804E3A0 for ; Thu, 26 Nov 2020 08:16:54 +0000 (UTC) X-HE-Tag: cub70_010b2682737d X-Filterd-Recvd-Size: 2211 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Thu, 26 Nov 2020 08:16:53 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id AF45968B02; Thu, 26 Nov 2020 09:16:50 +0100 (CET) Date: Thu, 26 Nov 2020 09:16:50 +0100 From: Christoph Hellwig To: Tejun Heo Cc: Christoph Hellwig , Jens Axboe , Josef Bacik , Konrad Rzeszutek Wilk , Coly Li , Mike Snitzer , Greg Kroah-Hartman , Jan Kara , Johannes Thumshirn , dm-devel@redhat.com, Richard Weinberger , Jan Kara , linux-block@vger.kernel.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 25/45] block: reference struct block_device from struct hd_struct Message-ID: <20201126081650.GA18807@lst.de> References: <20201124132751.3747337-1-hch@lst.de> <20201124132751.3747337-26-hch@lst.de> <20201125164515.GB1975@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Nov 25, 2020 at 03:20:23PM -0500, Tejun Heo wrote: > Agreed. It'd be nice to replace the stale comment. I've updated the comment. > > Jan added lookup_sem in commit 56c0908c855afbb to prevent a three way > > race between del_gendisk and blkdev_open due to the weird bdev vs > > gendisk lifetime rules. None of that can happen with the new lookup > > scheme. > > Understood. I think it'd be worthwhile to note that in the commit log. So after the idea of just holding a disk reference from each bdev did not work out very well I've reworked this a bit, and lookup_sem stays, but becomes global to protect the disk lookup (similar to the previous global bdev_map_lock).