Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp27516rwp; Wed, 12 Jul 2023 09:12:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlGw/6sPAvurxlEZ/duSQKf0yW7c12DkyLknXnE8MuIsuoizzA4AqAMAquJffp5Vi4DWnjKg X-Received: by 2002:a17:90b:3007:b0:263:ba94:b15 with SMTP id hg7-20020a17090b300700b00263ba940b15mr14740486pjb.4.1689178355454; Wed, 12 Jul 2023 09:12:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689178355; cv=none; d=google.com; s=arc-20160816; b=tafJurcGlkIN2xmGIcQz+YUa0m8jIhLiShRrlYxDuh9meetUxXTMHWmjunvpiWdebJ Q3RMD72230exme1byERNP/znrW3RWVbKNks38NYLMan7Us7cbRsixOz7v0FvN4y7JrN8 4WdHSqYOpp+BSm89cF7t99baTf8OrBJm5N3TeN9/R8HqfTV1LhViAOc86UsqeatF6YAb 0j1+DFpGaf3W3q9jEqw9Pef6SZ8KtU9mKX/MB21jPV4O+Grj1FgJ0q2PRwZ0S9ih60t2 Ce0VnrdkUU932T5xXw+Z0/3iT3rcWiOQTGgENjziu2sTxaBnKV9S+M1ZuJzd57J/vJ2T QtfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=8X6ArMXh62A5UxRR3ZN+q1CvObhoeb8ltfmXU1xj+zw=; fh=CVkuaoZvOl98lIAA1NRo1HmQ06fTCNc5//SOAnB7lQs=; b=CCqKyPa9rB861+vYADqmJLOECJxkJS/W91npuYw5dVJiro6X19cU+P4wGF20AcxaU1 xVaTQ3XX5/aFcBpZeQGeth4zKqcsxWPkHnuTCAsyr7zC3i6EFjcxuAx5UphygjNpTRhe 2DZRGSydW+DkLQ6rPbH1ZQsMpxQu/UPntErJgDNSNc/21uAHbu1WxI2omXkkM5/IzjS/ TzgJ2/Sk8OYIkQESG9TJUbZR6gDs3IUaoRKXhqUHV++HDNPcSRx3RsW6tAey9pqW6UtT zAYaX4csGMV19QbyoxWz5vskUjp7tL53CTK5cHjqOuUU2BdnjpWjOvgwacpCwgnLgsuB u5gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=V0Mwyzpf; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a656944000000b0055b57fb4b7esi3415342pgq.725.2023.07.12.09.12.19; Wed, 12 Jul 2023 09:12:35 -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=@ionos.com header.s=google header.b=V0Mwyzpf; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232981AbjGLQGy (ORCPT + 99 others); Wed, 12 Jul 2023 12:06:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233205AbjGLQGv (ORCPT ); Wed, 12 Jul 2023 12:06:51 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D8D31BF2 for ; Wed, 12 Jul 2023 09:06:48 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-4fb863edcb6so11538966e87.0 for ; Wed, 12 Jul 2023 09:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1689178006; x=1691770006; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8X6ArMXh62A5UxRR3ZN+q1CvObhoeb8ltfmXU1xj+zw=; b=V0Mwyzpfv5NHo344FebMkemb4OkDhqesSJzk3oLJrC1sXingJzi/DqoHJPX3cM7/kU /daZbGumusx7p3ETz9bL+dV7+a249DzrdJ5ucaxUqFs1cH4q4UNK1aBbCP0kRMVezgvK Gb0u18D1omT5qk875/bvJSIuyWWXlLKu5WnA0OT929rTcOY7rHqZVsWOvIcdQTq+Q4TI Xty8IQiQ2uEFjkBqRHhjaYUeIIjdk3TlKuW6ZBNL29/kZI8LKdOXvAAi+FiRNxSMUXsG 92h/diWQ5jGfG/Pc/9JTOLcLZ2bS8Hyd3sIfxIs/rFITeR6YjIQmonhcUevYE5m/zN7s SmPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689178006; x=1691770006; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8X6ArMXh62A5UxRR3ZN+q1CvObhoeb8ltfmXU1xj+zw=; b=fIcttYSvK9Zaw+VOFBh0hJA0mhL7xF6WVZMC9GAvI6U22TVvq1eUwqK1V5XWcfa8JB Hc19jCX/Fbp2Jp2ka4Fo9o1fHO4LF3nSbDOd3mC1DMevaASbH2qanWYh7jdkZBoJHtSM LdA62+dAMRaHCsBiCF8vdJ2dJ2Rr+FnfG2TrVCoH1tsS2q9Heo4vo6st+PWTW03nR3Nj k9Qd1AxrIN8i0Ihl6CdBavEETPgiE+jpWEKrG0AX8fGqCDaXv+hRNAKLzW2KSLcjZ/lf tXOq9C4Nr7UVrlvG+8IrnSQ6PxKE15kfLJWp2A7366JofwdWk6XOuD6CeWlqKQ+0Se+y ZHew== X-Gm-Message-State: ABy/qLZpKjM4A0XTwR1gFE9Y1OmblapZPBZHQP3FfFOLAP0/G/66LNV2 8pcX4IU36e9avpq/f3Ympp/LqlYqlGDwlnegtp7NNw== X-Received: by 2002:ac2:5b1d:0:b0:4fb:7a90:1abe with SMTP id v29-20020ac25b1d000000b004fb7a901abemr15797051lfn.49.1689178006211; Wed, 12 Jul 2023 09:06:46 -0700 (PDT) MIME-Version: 1.0 References: <20230629165206.383-1-jack@suse.cz> <20230704122224.16257-1-jack@suse.cz> In-Reply-To: From: Haris Iqbal Date: Wed, 12 Jul 2023 18:06:35 +0200 Message-ID: Subject: Re: [PATCH 01/32] block: Provide blkdev_get_handle_* functions 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, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 Thu, Jul 6, 2023 at 5:38=E2=80=AFPM 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 *ho= lder, > 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? (Apologies for the previous non-plaintext email) > > ?