Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4101216rdb; Mon, 11 Dec 2023 08:52:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IFAFWcKIXvvWmHWYoMIHHw1ewceqm1vowlNmIEbloah/dfYkf2zijleS+3HQ0vw4M5KJJHq X-Received: by 2002:a17:903:210d:b0:1d0:700b:3f8b with SMTP id o13-20020a170903210d00b001d0700b3f8bmr5027420ple.69.1702313551481; Mon, 11 Dec 2023 08:52:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702313551; cv=none; d=google.com; s=arc-20160816; b=NdGwpXTweRNB5bMbTaALSJYiiFZaXmeVMhPN4VV7eYhcYfRgeUey8Bub7eeX5sudmw 9jVvIkSbtV+5K2cFFfC/r1yn2Jpu1FGRM2Ny6Ej0D/f8wYwa/mDniccOnlWjmHW5M5Pt uYoFKyRRpatKp548d2qpiGSznfRbMN9OHfYgdLC88QY5evS1kad0ikBAK1/6Yepaiezt yvtz/Q7S2UhzZkSBgR5mQbL/TWlc33N7TmLc0HVMPGbtqzUXC1x9U1aHeQjHnkp6YYMz h9mQlayl1AZ2WyigMHDchpxOOx/p4djEARoj7JTwZgtHbf5+PL8p1jwxaX7hyN2/EpBB Fagg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature:dkim-signature:dkim-signature; bh=rKyChubYQOLUssFrI8/z8khe3/ZNZIgTAEz8GE5ZHf8=; fh=MeUUOj2j+iy27Ff8NnB29oTRl/j/84R5JYZt8JRFf0g=; b=Hgs0hyOgFaMvWHXquQwIvqyL+i0TtY17sNl+F2ymPqQXljqp73RJoLd9xLTkr43Om3 A+6Cx/EGi+rEXRnlvzLAXrbmVi1t3Eo/Khrl/xmLVCKCo1AjZV3HRYNv30f3eYdBBX4W I4IgLMNdb1Gxyx5/M2w++y5NFc6ELO7zg0DrrkYj8pP77PPvBmk6gfPOz3Cf8ZxmBgmc uTyNAC1uw22em4Eeoy2H661aacoHLqIQD67iObqNFCRkamnNYefeLiDghpTqyVcaiehC GEaXiKtJYkm/poJzboFzzNRRrw64H9LQOz/VBdR+OAcxyFxZORU0Y7l6+ZNMBpJaQs/i IuyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=KF7fZ16G; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=55atrZPO; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=KF7fZ16G; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=55atrZPO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f1-20020a170902e98100b001d082f4bd7esi6342524plb.250.2023.12.11.08.52.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 08:52:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=KF7fZ16G; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=55atrZPO; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=KF7fZ16G; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=55atrZPO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id DE39B8056A0A; Mon, 11 Dec 2023 08:52:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344586AbjLKQwT (ORCPT + 99 others); Mon, 11 Dec 2023 11:52:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234618AbjLKQwR (ORCPT ); Mon, 11 Dec 2023 11:52:17 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A20EB3; Mon, 11 Dec 2023 08:52:19 -0800 (PST) Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3A65722413; Mon, 11 Dec 2023 16:52:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1702313538; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rKyChubYQOLUssFrI8/z8khe3/ZNZIgTAEz8GE5ZHf8=; b=KF7fZ16GGZSNVIercO+eYb/zdHDuObhA9Onxa81BeqL3LeXtWEzJu+HqGO1kfleK3MMb9x jUugKN6DhI5mx4QzBnf4JH10nshySFJYQzot/cnv9bMAHLqxdYshFuHfymm3WHOgnJ+pWp 7mgLY2fOp0ANNoP3kZ8g+YQPQxBLCuM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1702313538; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rKyChubYQOLUssFrI8/z8khe3/ZNZIgTAEz8GE5ZHf8=; b=55atrZPOIWUHCEdWSl7m1h0isEhBA3PJTsKW7m5NfRjFtXZtvlPhx1kYCCQxQNMKERbIiQ 03X5sRIKKKs3qZCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1702313538; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rKyChubYQOLUssFrI8/z8khe3/ZNZIgTAEz8GE5ZHf8=; b=KF7fZ16GGZSNVIercO+eYb/zdHDuObhA9Onxa81BeqL3LeXtWEzJu+HqGO1kfleK3MMb9x jUugKN6DhI5mx4QzBnf4JH10nshySFJYQzot/cnv9bMAHLqxdYshFuHfymm3WHOgnJ+pWp 7mgLY2fOp0ANNoP3kZ8g+YQPQxBLCuM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1702313538; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rKyChubYQOLUssFrI8/z8khe3/ZNZIgTAEz8GE5ZHf8=; b=55atrZPOIWUHCEdWSl7m1h0isEhBA3PJTsKW7m5NfRjFtXZtvlPhx1kYCCQxQNMKERbIiQ 03X5sRIKKKs3qZCg== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 26D01134B0; Mon, 11 Dec 2023 16:52:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id 1uB1CUI+d2XzFAAAn2gu4w (envelope-from ); Mon, 11 Dec 2023 16:52:18 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id A24EDA07E3; Mon, 11 Dec 2023 17:52:17 +0100 (CET) Date: Mon, 11 Dec 2023 17:52:17 +0100 From: Jan Kara To: 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, yukuai3@huawei.com, yi.zhang@huawei.com, yangerkun@huawei.com Subject: Re: [PATCH RFC v2 for-6.8/block 01/18] block: add some bdev apis Message-ID: <20231211165217.fil437byq7w2vcp7@quack3> References: <20231211140552.973290-1-yukuai1@huaweicloud.com> <20231211140552.973290-2-yukuai1@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231211140552.973290-2-yukuai1@huaweicloud.com> X-Spam-Level: X-Spam-Score: -1.58 X-Spamd-Result: default: False [-1.26 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; BAYES_HAM(-1.96)[94.82%]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_RATELIMIT(0.00)[to_ip_from(RLg7z3ka1nnoi3zj4x13ixbdfk)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_GT_50(0.00)[50]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_CC(0.00)[kernel.dk,citrix.com,suse.de,gmail.com,lazybastard.org,bootlin.com,nod.at,ti.com,linux.ibm.com,oracle.com,fb.com,toxicpanda.com,suse.com,zeniv.linux.org.uk,kernel.org,fluxnic.net,mit.edu,dilger.ca,redhat.com,infradead.org,linux-foundation.org,samsung.com,vger.kernel.org,lists.xenproject.org,lists.infradead.org,lists.ozlabs.org,lists.linux.dev,huawei.com]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Flag: NO X-Spam-Level: X-Spam-Score: -1.26 Authentication-Results: smtp-out1.suse.de; none X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 11 Dec 2023 08:52:30 -0800 (PST) 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. Honza -- Jan Kara SUSE Labs, CR