Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30691578rwd; Thu, 6 Jul 2023 09:18:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlGKVtJ5cDG3mGTwhdmmlUj0JEIdA3aFzZ+WnVGza+QnZjPMDJlRtXCSrmCX+d1827zudlsC X-Received: by 2002:a92:6b03:0:b0:345:e800:c2af with SMTP id g3-20020a926b03000000b00345e800c2afmr3233931ilc.11.1688660312057; Thu, 06 Jul 2023 09:18:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688660312; cv=none; d=google.com; s=arc-20160816; b=NkENagRBSNO5oAEcm83JERZFUldqWCemwF/46tXkxip+qCra/n3FYWt3HSjBqm2Ybv 239MxRkWRolYB8deyBLc6pVtNP1znA1SL/RYI+WpWJVWKSKzZ/B5H/P2gDhUhHkMy+n7 OB2KSGTD11I1k/NLIHAV4HXpRd8n/W5usUyPO8mKOROdbvFZo4evjGchV9EAA9H/CwH8 Q3wk1ANpYPgSQvrMApw3W7RZhyiZmi1ukCRxanattzAK6/6Z/r7YKy/UiJAr09CORB1K YgVDXuW5a29pTqASpsisLodaHjWdu4Jhkr1Mn04fGMEVT3tucSC7yCxSZwVRq86QJLgu B0wQ== 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=U3X2c4DZ7u1WJQoXTnnFA0EIrJReIsvKkxSR5ka0KIA=; fh=jcmCbfbqbSKAjVQ8ZKe3RQciYcc3WZRwFBV8HFGdy2M=; b=ncwxOxxay2E+u3/5QRS/MXhDipJRA/cPHe0EyKCSh2w0ta/76ZCpDMlqmJmwfnywiy lvEIC/rFYq0gh4ChM2FNK/y9cQrAfcu8IO7glv9YwxviNwEL1ldWHWS3T7ez2utaMHfi fHXId79cor5S31wLQ7j58owH/IHcmL9ZUHT1rO7w+n/LNDPUSyF6outFenbunJszCJ+l NgaVTv4zDERBqI2GmHNvMI/RJ8PBLT2Y5ddLvGbj3QPFShuXB1T96hj3SzhrYWEuuFf/ C9EEjoN7B3LIsgvP36B67PeiQk/eeHq/j6luvd/ogTElHK8XcPd6O8o3gELXWPPs+pvn qFaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=QmpkaGPR; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=BFZ9Tyry; 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 x69-20020a638648000000b0053eefa04dc0si1669968pgd.276.2023.07.06.09.18.10; Thu, 06 Jul 2023 09:18:32 -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=QmpkaGPR; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=BFZ9Tyry; 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 S232412AbjGFQOl (ORCPT + 99 others); Thu, 6 Jul 2023 12:14:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231660AbjGFQOj (ORCPT ); Thu, 6 Jul 2023 12:14:39 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C8B3129; Thu, 6 Jul 2023 09:14:36 -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 4E502223E8; Thu, 6 Jul 2023 16:14:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688660074; 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=U3X2c4DZ7u1WJQoXTnnFA0EIrJReIsvKkxSR5ka0KIA=; b=QmpkaGPRZaoHJzRo2a6TjndqPucrWh7f/FY2L3L/tkSmDEI1eMsM8wrizbEulyyCbALdKF NAhJw22VD9dE7RV9U1X7QxEMrx2wMp7N4RocvtwIIP7j7sOckxmGngjpgD0K7UzZlI8BMj 7TaptoZ4hnlDaa+a0YvCourIJS7rkEc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688660074; 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=U3X2c4DZ7u1WJQoXTnnFA0EIrJReIsvKkxSR5ka0KIA=; b=BFZ9TyrydR/g+7ExWBaMGJWuaCnekgsDWt3QOA77tpx+pa0ab3V9kDQ7HgXi8ns77IxFLs krph+7hPTygy6eCw== 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 2ADF1138EE; Thu, 6 Jul 2023 16:14:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +RN/CmropmTIKwAAMHmgww (envelope-from ); Thu, 06 Jul 2023 16:14:34 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id B00D6A0707; Thu, 6 Jul 2023 18:14:33 +0200 (CEST) Date: Thu, 6 Jul 2023 18:14:33 +0200 From: Jan Kara To: Christoph Hellwig Cc: Jan Kara , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jens Axboe , 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: <20230706161433.lj4apushiwguzvdd@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 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 Thu 06-07-23 08:38:40, Christoph Hellwig wrote: > On Tue, Jul 04, 2023 at 02:21:28PM +0200, Jan Kara wrote: > > Create struct bdev_handle that contains all parameters that need to be > > passed to blkdev_put() and provide blkdev_get_handle_* functions that > > return this structure instead of plain bdev pointer. This will > > eventually allow us to pass one more argument to blkdev_put() without > > too much hassle. > > Can we use the opportunity to come up with better names? blkdev_get_* > was always a rather horrible naming convention for something that > ends up calling into ->open. > > What about: > > struct bdev_handle *bdev_open_by_dev(dev_t dev, blk_mode_t mode, void *holder, > const struct blk_holder_ops *hops); > struct bdev_handle *bdev_open_by_path(dev_t dev, blk_mode_t mode, > void *holder, const struct blk_holder_ops *hops); > void bdev_release(struct bdev_handle *handle); I'd maybe use bdev_close() instead of bdev_release() but otherwise I like the new naming. Honza -- Jan Kara SUSE Labs, CR