Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29273253rwd; Wed, 5 Jul 2023 09:26:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlFhPY/e5jHd212Bz4A4374MpCyhptYoMRYa+SUAL/1Z7XspOdWX2YZ8ru5bYAlO/vBDtNKq X-Received: by 2002:a17:902:760b:b0:1b8:5a32:2345 with SMTP id k11-20020a170902760b00b001b85a322345mr11292930pll.22.1688574418699; Wed, 05 Jul 2023 09:26:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688574418; cv=none; d=google.com; s=arc-20160816; b=TvIjPrurVHNVrjiaI9AurD04qLQIDLqUrPKAEUAcle9mmVwmGmDdLyUJL3wNMZAg0U XK1BEvbaQoKroYGs8r74yGV8zpM6TNOKxlNtFyWKaBuyYOOBkW5vm0DrQ8r2VDv+tkry G420kVrHBrgJDxAc3Ih/ZACVIDsA73Bd9mdWaD7cbiIMY9+A92UpaemGPt2DKul64BdN m9T3EXzxf4dwgKrI9f1ZTUEc5AopwdkF1rYTYyaSMQZPdmAK+TxzniwByBVhxYkZxnGD S3Lp1mqsep2C3yNea2cMKNY/gN0il/CyTXLPIOYlhQj1g4XnLtDo+NUyCXmP3G/Jo1HZ +ZOA== 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; bh=laJnl7HhQK/Tv/PqzUYoidR/wXDE+WAIJVPIFf2lcfQ=; fh=P1EhwAd+754m5WWg/CJokr3KBxXGsxe/kNoFHJxbY6c=; b=EqwrgbG38R43qsj6IOcFVd6gUnb7uSZfY/HVe2MbA+dmy2x45ZeVlnJuWfSHOCu/pb kIR7gGa2+6a2mOs5rhBCFL4HCkBpRpb1+xSklHSIqvPMeCbG6GWFSv99wmVvCkg7cj0Z 0zyU5XKlpMC3o0X326omaNNry65v73Hrt5jhCwQASfviTfWaKd/eurJ5CBWYTFHYPBmM wvQdfJxVaEVSV0CTnzA4EHk2R5K7hFC999+P3oiadpk0+JI29CGX6qTZXrRC/UlQPvgT z05INKQZvFeVC1vr8fQEi4qw7OCldoiV5C+R1wjEf2/eBDDBYiiixohcDGmKfbIy1BYv TbMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=pVxtRSYx; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=6GnGLv2M; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ij16-20020a170902ab5000b001b8af930e3dsi1760860plb.487.2023.07.05.09.26.34; Wed, 05 Jul 2023 09:26:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=pVxtRSYx; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=6GnGLv2M; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231847AbjGEQMa (ORCPT + 99 others); Wed, 5 Jul 2023 12:12:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230286AbjGEQM2 (ORCPT ); Wed, 5 Jul 2023 12:12:28 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 805621700; Wed, 5 Jul 2023 09:12:27 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id CB46921E20; Wed, 5 Jul 2023 16:12:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688573545; 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=laJnl7HhQK/Tv/PqzUYoidR/wXDE+WAIJVPIFf2lcfQ=; b=pVxtRSYxDum30xk4c2JQyuaRHFNvjqGI5pa+1l9TjK2H7ROMjo7EdIGdDlzQXwaIwGyi0D MYHnvgKqRst/eyFC+Okrc961iU1V/Mr8qyrvjiZzwHXWReUpWSrhSFOpe79t3kyTfJeQAV Hf2p1cnNnsYhDEREwuHH1JI7foWXj1M= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688573545; 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=laJnl7HhQK/Tv/PqzUYoidR/wXDE+WAIJVPIFf2lcfQ=; b=6GnGLv2MGHnmlspZbI9IPcwZjE0UgNGbJUyuJME/ujhWk8XPp6xGrnnDrvfBxv6bSto5fw 0j8hz2dNTzGg/WAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A8D5D134F3; Wed, 5 Jul 2023 16:12:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id p7ssKWmWpWRbQAAAMHmgww (envelope-from ); Wed, 05 Jul 2023 16:12:25 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 1C3A6A0707; Wed, 5 Jul 2023 18:12:25 +0200 (CEST) Date: Wed, 5 Jul 2023 18:12:25 +0200 From: Jan Kara To: Bart Van Assche Cc: Jan Kara , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jens Axboe , Christoph Hellwig , Alasdair Kergon , Andrew Morton , Anna Schumaker , Chao Yu , Christian Borntraeger , "Darrick J. Wong" , Dave Kleikamp , David Sterba , dm-devel@redhat.com, drbd-dev@lists.linbit.com, Gao Xiang , Jack Wang , Jaegeuk Kim , jfs-discussion@lists.sourceforge.net, Joern Engel , Joseph Qi , Kent Overstreet , linux-bcache@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mm@kvack.org, linux-mtd@lists.infradead.org, linux-nfs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-nvme@lists.infradead.org, linux-pm@vger.kernel.org, linux-raid@vger.kernel.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, linux-xfs@vger.kernel.org, "Md. Haris Iqbal" , Mike Snitzer , Minchan Kim , ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, Sergey Senozhatsky , Song Liu , Sven Schnelle , target-devel@vger.kernel.org, Ted Tso , Trond Myklebust , xen-devel@lists.xenproject.org Subject: Re: [PATCH 01/32] block: Provide blkdev_get_handle_* functions Message-ID: <20230705161225.cwig5a3mo6oz7lew@quack3> References: <20230629165206.383-1-jack@suse.cz> <20230704122224.16257-1-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-nfs@vger.kernel.org On Tue 04-07-23 07:06:26, Bart Van Assche wrote: > On 7/4/23 05:21, Jan Kara wrote: > > +struct bdev_handle { > > + struct block_device *bdev; > > + void *holder; > > +}; > > Please explain in the patch description why a holder pointer is introduced > in struct bdev_handle and how it relates to the bd_holder pointer in struct > block_device. Is one of the purposes of this patch series perhaps to add > support for multiple holders per block device? No. The reason for adding holder to struct bdev_handle is that it is an argument blkdev_put() needs. Currently, every user of blkdev_put() has to remember what it has passed as 'holder' to blkdev_get_by_*() call and pass that to blkdev_put(). With struct bdev_handle this will happen automatically. This is already explained in the changelog of this patch: "Create struct bdev_handle that contains all parameters that need to be passed to blkdev_put()..." If it was only about holder, the intrusive patches would not be warranted but as the description also says: "This will eventually allow us to pass one more argument to blkdev_put() without too much hassle." Because we will additionaly need to propagate the 'mode' argument used at open to blkdev_put(). Honza -- Jan Kara SUSE Labs, CR