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=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 D6A31C56202 for ; Thu, 26 Nov 2020 15:45:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7677D21D1A for ; Thu, 26 Nov 2020 15:45:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7677D21D1A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0C3B16B0071; Thu, 26 Nov 2020 10:45:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 09B5B6B0074; Thu, 26 Nov 2020 10:45:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EF2886B0075; Thu, 26 Nov 2020 10:45:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0076.hostedemail.com [216.40.44.76]) by kanga.kvack.org (Postfix) with ESMTP id D85CD6B0071 for ; Thu, 26 Nov 2020 10:45:33 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 992EA1EE6 for ; Thu, 26 Nov 2020 15:45:33 +0000 (UTC) X-FDA: 77526994146.25.toe91_4f0926e27380 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id D32331804E3B5 for ; Thu, 26 Nov 2020 15:45:29 +0000 (UTC) X-HE-Tag: toe91_4f0926e27380 X-Filterd-Recvd-Size: 3393 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Thu, 26 Nov 2020 15:45:29 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 41B9FAD20; Thu, 26 Nov 2020 15:45:28 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id C71901E10D0; Thu, 26 Nov 2020 16:45:27 +0100 (CET) Date: Thu, 26 Nov 2020 16:45:27 +0100 From: Jan Kara To: Christoph Hellwig Cc: Jens Axboe , Tejun Heo , Josef Bacik , Coly Li , Mike Snitzer , Greg Kroah-Hartman , Jan Kara , Johannes Thumshirn , dm-devel@redhat.com, Jan Kara , linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 23/44] block: remove i_bdev Message-ID: <20201126154527.GJ422@quack2.suse.cz> References: <20201126130422.92945-1-hch@lst.de> <20201126130422.92945-24-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201126130422.92945-24-hch@lst.de> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Thu 26-11-20 14:04:01, Christoph Hellwig wrote: > Switch the block device lookup interfaces to directly work with a dev_t > so that struct block_device references are only acquired by the > blkdev_get variants (and the blk-cgroup special case). This means that > we now don't need an extra reference in the inode and can generally > simplify handling of struct block_device to keep the lookups contained > in the core block layer code. > > Signed-off-by: Christoph Hellwig > Acked-by: Tejun Heo > Acked-by: Coly Li [bcache] Looks good to me. Just two nits about comments below. You can add: Reviewed-by: Jan Kara > /** > - * blkdev_get - open a block device > - * @bdev: block_device to open > + * blkdev_get_by_dev - open a block device by device number > + * @dev: device number of block device to open > * @mode: FMODE_* mask > * @holder: exclusive holder identifier > * > - * Open @bdev with @mode. If @mode includes %FMODE_EXCL, @bdev is > - * open with exclusive access. Specifying %FMODE_EXCL with %NULL > - * @holder is invalid. Exclusive opens may nest for the same @holder. > + * Open the block device described by device number @dev. If @mode includes > + * If @mode includes %FMODE_EXCL, the block device is opened with exclusive ^^^ twice "If @mode includes" - here and on previous line... ... > @@ -776,19 +770,6 @@ struct super_block *__get_super(struct block_device *bdev, bool excl) > return NULL; > } > > -/** > - * get_super - get the superblock of a device > - * @bdev: device to get the superblock for > - * > - * Scans the superblock list and finds the superblock of the file system > - * mounted on the device given. %NULL is returned if no match is found. > - */ I think it would be nice to preserve this comment? Honza -- Jan Kara SUSE Labs, CR