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.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 9BC58C5519F for ; Wed, 25 Nov 2020 06:11:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 41DE3208CA for ; Wed, 25 Nov 2020 06:11:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727178AbgKYGLk (ORCPT ); Wed, 25 Nov 2020 01:11:40 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:7983 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725838AbgKYGLk (ORCPT ); Wed, 25 Nov 2020 01:11:40 -0500 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CgrB346lSzhfQ7; Wed, 25 Nov 2020 14:11:23 +0800 (CST) Received: from [10.136.114.67] (10.136.114.67) by smtp.huawei.com (10.3.19.210) with Microsoft SMTP Server (TLS) id 14.3.487.0; Wed, 25 Nov 2020 14:11:36 +0800 Subject: Re: [PATCH 38/45] block: switch partition lookup to use struct block_device To: Christoph Hellwig , Jens Axboe CC: Tejun Heo , Josef Bacik , "Konrad Rzeszutek Wilk" , Coly Li , "Mike Snitzer" , Greg Kroah-Hartman , Jan Kara , Johannes Thumshirn , , Richard Weinberger , Jan Kara , , , , , , References: <20201124132751.3747337-1-hch@lst.de> <20201124132751.3747337-39-hch@lst.de> From: Chao Yu Message-ID: Date: Wed, 25 Nov 2020 14:11:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20201124132751.3747337-39-hch@lst.de> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.136.114.67] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-bcache@vger.kernel.org On 2020/11/24 21:27, Christoph Hellwig wrote: > Use struct block_device to lookup partitions on a disk. This removes > all usage of struct hd_struct from the I/O path, and this allows removing > the percpu refcount in struct hd_struct. > > Signed-off-by: Christoph Hellwig > --- > block/bio.c | 4 +- > block/blk-core.c | 66 ++++++++++++++---------------- > block/blk-flush.c | 2 +- > block/blk-mq.c | 9 ++-- > block/blk-mq.h | 7 ++-- > block/blk.h | 4 +- > block/genhd.c | 56 +++++++++++++------------ > block/partitions/core.c | 7 +--- > drivers/block/drbd/drbd_receiver.c | 2 +- > drivers/block/drbd/drbd_worker.c | 2 +- > drivers/block/zram/zram_drv.c | 2 +- > drivers/md/bcache/request.c | 4 +- > drivers/md/dm.c | 4 +- > drivers/md/md.c | 4 +- > drivers/nvme/target/admin-cmd.c | 20 ++++----- > fs/ext4/super.c | 18 +++----- > fs/ext4/sysfs.c | 10 +---- > fs/f2fs/f2fs.h | 2 +- > fs/f2fs/super.c | 6 +-- For f2fs part, Acked-by: Chao Yu Thanks, > include/linux/blkdev.h | 8 ++-- > include/linux/genhd.h | 4 +- > include/linux/part_stat.h | 17 ++++---- > 22 files changed, 120 insertions(+), 138 deletions(-)