From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86BDEC77B7D for ; Thu, 18 May 2023 13:15:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231290AbjERNPX (ORCPT ); Thu, 18 May 2023 09:15:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231674AbjERNOb (ORCPT ); Thu, 18 May 2023 09:14:31 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C4BF9C; Thu, 18 May 2023 06:13:43 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id DDE7268D0E; Thu, 18 May 2023 15:13:05 +0200 (CEST) Date: Thu, 18 May 2023 15:13:05 +0200 From: Christoph Hellwig To: Christian Brauner Cc: Christoph Hellwig , Jens Axboe , Al Viro , "Darrick J. Wong" , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org Subject: Re: [PATCH 5/9] block: introduce holder ops Message-ID: <20230518131305.GA32330@lst.de> References: <20230516-kommode-weizen-4c410968c1f6@brauner> <20230517073031.GF27026@lst.de> <20230517-einreden-dermatologisch-9c6a3327a689@brauner> <20230517080613.GA31383@lst.de> <20230517-erhoffen-degradieren-d0aa039f0e1d@brauner> <20230517120259.GA16915@lst.de> <20230517-holzfiguren-anbot-490e5a7f74fe@brauner> <20230517142609.GA28898@lst.de> <20230518-teekanne-knifflig-a4ea8c3c885a@brauner> <20230518131216.GA32076@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230518131216.GA32076@lst.de> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org On Thu, May 18, 2023 at 03:12:16PM +0200, Christoph Hellwig wrote: > On Thu, May 18, 2023 at 10:13:04AM +0200, Christian Brauner wrote: > > Fwiw, I didn't mean to have a special device handler for an O_PATH fd. > > I really just tried to figure out whether it would make sense to have an > > fd-based block device lookup function because right now we only have > > blkdev_get_by_path() and we'd be passing blkdev fds through the mount > > api. But I understand now how I'd likely do it. So now just finding time > > to actually implement it. > > What's wrong with blkdev_get_by_dev(file_inode(file)->i_rdev) after > the sanity checks from lookup_bdev (S_ISBLK and may_open_dev)? s/i_rdev/i_dev/