Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4275465rwb; Mon, 31 Jul 2023 04:38:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlFWIMX4ZIRYIm0MElIobKuhiFJ1gefmMX/4+lBSlfubhWmC1NdEnQNzRj/iAjUwvR134YOT X-Received: by 2002:a17:902:e5c4:b0:1bb:5b88:73da with SMTP id u4-20020a170902e5c400b001bb5b8873damr10341017plf.61.1690803479660; Mon, 31 Jul 2023 04:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690803479; cv=none; d=google.com; s=arc-20160816; b=EDEXK078q52PqduPeohkzN+hQsaKvgEXpdtzTn9bm73ffeUdrHmpfEm2GvNDzuBtBU /ax6JwU127j0f3q4Y1tsUSLDIITN1iVPPiR7uSUrDw6XiV7NL3+oGUzNQz307JqRSeI3 HwVGg2EteMDOEGXI5JZbHpolcL68FVvHEqW2uVZqfHpB+IR19XWw6gQtxnJyOFWCHh4j sUvZ8Rv/+0t9Z67fJ2tAlf7hAgQZuGTzg1CmheQiTtkzwpdORoM8ve3UIRMfdvEUXhQU L/Ak7+F7tawqQGZO9s6iEXmBjC2sIemFH7ND4GjnWz0dg+9fUjVIpc+PAUB7Aq+3BAts VHaw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=PJDu3H9G0xjlLFp1Wxvq9yQHkB2Q9jBIbPsGkP5jLhY=; fh=WZNpTDwkKqqILXchZo7qbeA96dCxIZ6eOzpI9DQAepc=; b=aukA7OXhJAj5GB71pz2TVysYvvLSxIMzrRTihWJ0z5vS8Pu19snRr7zjEIlZuiUzv/ w4CFBM2GwPEkmVmKZ4xTV4Y+W6iJYCYiyVMr+uqyt9wZ2fib9qbnsm1I/8pA8QY1Gse+ LQSFLvNV87nc7Rrrkr/pgR3uWGzWYQo2tmEJlibg6XMZ/vZZpVXEM1uWjXWDo9WDjvTr sh9itdo5Xc6nFPgew6C50xZdvF6xnoYJGy2//KeNQgmyccMCKgDC+A4Legs/YzpprtTa X+tfITJrmiDIgaye+Vg0x/YFPYcKQ17tsYUjifoWnhfMIl3xTSt33j2dIDGevSBRn2UC ASZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=LfsIvVgX; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-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 y12-20020a1709029b8c00b001b8a88cba84si6991496plp.129.2023.07.31.04.37.43; Mon, 31 Jul 2023 04:37:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=LfsIvVgX; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231950AbjGaKw3 (ORCPT + 99 others); Mon, 31 Jul 2023 06:52:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231432AbjGaKwL (ORCPT ); Mon, 31 Jul 2023 06:52:11 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CBE41BFD; Mon, 31 Jul 2023 03:51:17 -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 ED50E22197; Mon, 31 Jul 2023 10:50:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1690800635; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PJDu3H9G0xjlLFp1Wxvq9yQHkB2Q9jBIbPsGkP5jLhY=; b=LfsIvVgX25rf01P6sVcmZRL3nPMT3sPJRPMrpOspwMqpMg9mmQx6AkDi/eF6WU32a2Vp6x /7YLD1OJK0u+bqfGa4P87gaOpA6/QZlHA1eZkenSQs1V9CjuRPICqxTQ9KdHYFZ84hOqsV 4L46K3Rf4+bEtg2brIa/aboXrQrqviE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1690800635; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PJDu3H9G0xjlLFp1Wxvq9yQHkB2Q9jBIbPsGkP5jLhY=; b=X5g/KyOpcE2CiMGegP9N6Ypxz5sWUyAuayNnMILk5q3XabEg0BuGZ7c8jHqKycooaqKD7s Ajq9KEorZZBfWcDQ== 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 D6932133F7; Mon, 31 Jul 2023 10:50:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ovhUNPqRx2R2ZgAAMHmgww (envelope-from ); Mon, 31 Jul 2023 10:50:34 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 457F5A0767; Mon, 31 Jul 2023 12:50:34 +0200 (CEST) Date: Mon, 31 Jul 2023 12:50:34 +0200 From: Jan Kara To: Haris Iqbal Cc: Christoph Hellwig , 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, 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: <20230731105034.43skhi5ubze563c3@quack3> References: <20230629165206.383-1-jack@suse.cz> <20230704122224.16257-1-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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-ext4@vger.kernel.org On Wed 12-07-23 18:06:35, Haris Iqbal wrote: > On Thu, Jul 6, 2023 at 5:38 PM 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); > > +1 to this. > Also, if we are removing "handle" from the function, should the name > of the structure it returns also change? Would something like bdev_ctx > be better? I think the bdev_handle name is fine for the struct. After all it is equivalent of an open handle for the block device so IMHO bdev_handle captures that better than bdev_ctx. Honza -- Jan Kara SUSE Labs, CR