Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5022560rdb; Tue, 12 Dec 2023 17:10:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IGCiyyqsv/l/2r6u+c7iU6c5v374rZ2o9SChEEaQ6kU1MJHCc83i/EA4Us4BnJ09Io+JZ6K X-Received: by 2002:a05:622a:60c:b0:425:9382:6532 with SMTP id z12-20020a05622a060c00b0042593826532mr10306207qta.10.1702429830063; Tue, 12 Dec 2023 17:10:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702429830; cv=none; d=google.com; s=arc-20160816; b=Sq/b+R7vZlqKQcA2ewWmR1paxbkhgsL5wh2/RdSR6zlGnvwRuO+Uk7YhXB3Jc0OaSt Q6sISzPPgpqRlnfGkkb5ZTZCCaHdO96L9qvaQlB/HNKmos/g/txv1xoM0bAC2jfjseJL 7GPtfShp4fi5qQN1GaTEAzFhXshlPgkuvpa3qu5v/ytk7JysblK6NaYNbXY/TBnJMqL4 fLPF9I/52FmZDeDWR5hrpVUrIdh6SJG0IxDiHVq42G2ad0AEOaRys0+o4RBV0DjHFtzV dTP3bhSXbCyW4qxObDCIF2bl/9dnZlFnTLF7pAgn/mPs3fkMRs2ag2s2brVSGh6ze+p5 Vg7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:date:message-id:from :references:cc:to:subject; bh=AzrUsNe2qqIsfRJBtY3yQGmlAWQaNal/ueznfRpb9Tc=; fh=nVJIJg1yk2yUw0VG99LIwUD/hko1mBLh9O2ZRGp7H2E=; b=GDvTcsFPa21+ArH/IeIzmv+zLYKxTfmMkzkVK7RcAZrMTs2lm1dmg5vO40YZjh8rds hxY+2o8mf3zniW+4HJX7fCvoLCNJD35Q55zTvl36yUCyuD5wQGsPDyF6zwL7qTMBpmO+ HluwUKtIrzwRgS6ZMqf/M3jRTeGmENEnQQmWDU88kNnJTt6VhYuXLR/Xe+OiIch4/Rwu 2uv4IO5V3UB8aK+fbFL9dXFBc64fWTt6DrVIclzO9+J+jlNKPvNZXvHmUIt56lvf2sEw 9I/yFL4clm5RFcXpnPSVq5YdRnkoaaHmMf4O3VBMR2sb67Ttg6CZxcpmPHWV8BQrbOak DYMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-415-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-415-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e9-20020ac85989000000b00425f05c4058si71809qte.648.2023.12.12.17.10.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 17:10:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-415-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-415-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-415-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CD7C61C20DB6 for ; Wed, 13 Dec 2023 01:10:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 219C517F4; Wed, 13 Dec 2023 01:10:15 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92935CD; Tue, 12 Dec 2023 17:10:11 -0800 (PST) Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4Sqcpl4009z4f3jps; Wed, 13 Dec 2023 09:10:07 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id B49591A0952; Wed, 13 Dec 2023 09:10:08 +0800 (CST) Received: from [10.174.176.73] (unknown [10.174.176.73]) by APP1 (Coremail) with SMTP id cCh0CgDX2xFuBHlllVr5DQ--.61515S3; Wed, 13 Dec 2023 09:10:07 +0800 (CST) Subject: Re: [PATCH RFC v2 for-6.8/block 01/18] block: add some bdev apis To: Christoph Hellwig , Jan Kara Cc: Yu Kuai , axboe@kernel.dk, roger.pau@citrix.com, colyli@suse.de, kent.overstreet@gmail.com, joern@lazybastard.org, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, sth@linux.ibm.com, hoeppner@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, jejb@linux.ibm.com, martin.petersen@oracle.com, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, viro@zeniv.linux.org.uk, brauner@kernel.org, nico@fluxnic.net, xiang@kernel.org, chao@kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, agruenba@redhat.com, jack@suse.com, konishi.ryusuke@gmail.com, willy@infradead.org, akpm@linux-foundation.org, p.raghav@samsung.com, hare@suse.de, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, linux-bcachefs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, gfs2@lists.linux.dev, linux-nilfs@vger.kernel.org, yi.zhang@huawei.com, yangerkun@huawei.com, "yukuai (C)" References: <20231211140552.973290-1-yukuai1@huaweicloud.com> <20231211140552.973290-2-yukuai1@huaweicloud.com> <20231211165217.fil437byq7w2vcp7@quack3> From: Yu Kuai Message-ID: <718c424e-2514-8a14-b461-7e20b6355d16@huaweicloud.com> Date: Wed, 13 Dec 2023 09:10:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID:cCh0CgDX2xFuBHlllVr5DQ--.61515S3 X-Coremail-Antispam: 1UD129KBjvdXoW7XF1DtryfCryDXw4DAry7Wrg_yoW3GFg_Xr 909FW8K3W8A3ykJr43trs8Kr9YyFs2gr1UZrWrJ3W7X34kXFs8GFWvyr98WryfGw48CrnI kF9F934fJr92qjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbaxFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j 6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcVAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628vn2kI c2xKxwCYjI0SjxkI62AI1cAE67vIY487MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4 AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE 17CEb7AF67AKxVWrXVW8Jr1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCw CI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJwCI42IY6xAIw20EY4v20xvaj40_Gr0_ Zr1lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8Jr0_Cr1UYx BIdaVFxhVjvjDU0xZFpf9x0JUCXdbUUUUU= X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ Hi, ?? 2023/12/12 21:14, Christoph Hellwig ะด??: > On Mon, Dec 11, 2023 at 05:52:17PM +0100, Jan Kara wrote: >>> +void bdev_associated_mapping(struct block_device *bdev, >>> + struct address_space *mapping) >>> +{ >>> + mapping->host = bdev->bd_inode; >>> +} >> >> Here I'm not sure - is the helper really a win? It seems a bit obscure to >> me. This initialization of another mapping for a bdev looks really special. > > If we want to hide bd_inode we'll something like this helper even if > I don't particularly like it either. > > But it might be a good idea to move out of this series and into the > follow on removing bd_inode, as it's rather pointless without that > context. Yes, this sounds good, I'll remove this from v3. Thanks, Kuai > . >