Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4351903rdb; Mon, 11 Dec 2023 17:25:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IGi0qlO5twkGMEGNwgjHmpboN/fVKjWjcogKLIUXfWJYV5gHmbz821Z45TeD5HyRT8dV8R3 X-Received: by 2002:a05:6e02:1449:b0:35d:61e4:93c9 with SMTP id p9-20020a056e02144900b0035d61e493c9mr7065613ilo.43.1702344349646; Mon, 11 Dec 2023 17:25:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702344349; cv=none; d=google.com; s=arc-20160816; b=OXEo/Ph2P1Czn+BlzAILaO92e51cvP2DzPUcm6ezvNy5XwPTRpLN33SPX0g2XAZ0fe rO/LT0S7EZgCTnki1FhDBfbkHI4RvfKaXx7q08O4QpDU0G/UuEKcMVyj0XfOsjuX5kS7 C67Kz+SGq0pBMgSYfB+l/SoyO1UcUe8Yk5uiSkeAWf0O54EfjQGVkMUHJj6feBZ1hc50 wxaSwkLtFGYkp34BOUrP3YvBu53unHztSB8iEj9PviWwq9I+DG9T1OFGyLurXk+Hpi9+ yZd6uQdkWLDzb1TRmYE5pBIY75V35b0eFkbWfSEsFBUCKHVx+fvBNKEegv52IdLST53J OFWw== 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=To8LdSeAhRP/HJXAhv4BZVMppO4oHhiwDrW9qm2maRE=; fh=foLyJR996BgjKQr1kKAcv5oYx70uSy04pw8dVelyWIc=; b=w411kOEfcaI2ZOtELhWO/9sjN3j5E9hRY4cZ/W+BrCc9jmWI+Wu29lF5SSRL9JhmFL PvG9IdISyHjiOvagISQ6KGattwCVC1FyXzEAXy68dzaHc0iP2TwE6CepXAVIBlmQwdm2 o4T4b+tFEDzBdabjREjU2id1cqvmFibDKKrm1iM5yUYFSAYRfT0/JT2LBpkvFheoPFES SwS1vOSXCxt/ndqluKidq81P1R2xfuXX401+29n6ZsK4+d6sJtPsseJMmzjJ7JZ8gatk QrkTNeLJxkm8tVoSjCLa43iGeSfkrl9/oEQ/5el7fOKSH8iCQXczueZ0Fd5azMdUCtpY AYAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-384-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-384-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m5-20020a635805000000b005c661524f67si6869453pgb.26.2023.12.11.17.25.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 17:25:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-384-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-384-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-384-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id CCB3E2825C4 for ; Tue, 12 Dec 2023 01:25:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B70B23A5; Tue, 12 Dec 2023 01:25:35 +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 65C39D0; Mon, 11 Dec 2023 17:25:31 -0800 (PST) Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4Sq1Bq47PJz4f3lDH; Tue, 12 Dec 2023 09:25:23 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 6A3D51A049A; Tue, 12 Dec 2023 09:25:28 +0800 (CST) Received: from [10.174.176.73] (unknown [10.174.176.73]) by APP1 (Coremail) with SMTP id cCh0CgDn6hCEtndlu5ydDQ--.58697S3; Tue, 12 Dec 2023 09:25:27 +0800 (CST) Subject: Re: [PATCH RFC v2 for-6.8/block 01/18] block: add some bdev apis To: Jan Kara , Yu Kuai Cc: 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: <7d2bfa29-f93d-def2-80a3-72af063b36b3@huaweicloud.com> Date: Tue, 12 Dec 2023 09:25:24 +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: <20231211165217.fil437byq7w2vcp7@quack3> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID:cCh0CgDn6hCEtndlu5ydDQ--.58697S3 X-Coremail-Antispam: 1UD129KBjvdXoW7JF4fJw47CF1rCry7Ww4DJwb_yoWfGrc_ZF nakrWkWw1fJa18Kr4qyFs0vr1kWayrWr42vry8tanrX3yrXa92kFsrKr1Fkr45G3yqkrnx uFn2gFyxJr10qjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbaxFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j 6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcVAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628vn2kI c2xKxwCYjI0SjxkI62AI1cAE67vIY487MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4 AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE 17CEb7AF67AKxVWrXVW8Jr1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCw CI42IY6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr1UMIIF0xvE42xK8VAvwI8IcIk0rVWrZr1j 6s0DMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYx BIdaVFxhVjvjDU0xZFpf9x0JUd8n5UUUUU= X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ Hi, ?? 2023/12/12 0:52, Jan Kara ะด??: > On Mon 11-12-23 22:05:35, Yu Kuai wrote: >> From: Yu Kuai >> >> Those apis will be used for other modules, so that bd_inode won't be >> accessed directly from other modules. >> >> Signed-off-by: Yu Kuai > > ... > >> +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. Yes, I don't like this helper at all, but gfs2 is used this way, and I need this helper to remove 'bd_inode' from block_devcie later. I'm not familiar with gfs2 at all but perhaps it worth to dig deeper and figure out a proper way for gfs2. Thanks, Kuai > > Honza >