Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1147278iog; Wed, 15 Jun 2022 23:09:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vtrelRxZwVYGzuDr5hvoGF7P6vVWaU7Asoqgr8n1F0aXQ6sESa41vERdsTTxVeeNLR8CuV X-Received: by 2002:a17:902:e54c:b0:167:4f35:9556 with SMTP id n12-20020a170902e54c00b001674f359556mr2936494plf.5.1655359750514; Wed, 15 Jun 2022 23:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655359750; cv=none; d=google.com; s=arc-20160816; b=yGwXgTF875GmxgEt0rq7sNaHghiNkIbMjfNQsHHYYkBH9CAU2liICJBUrKvYtpTcqM lPJB15/MxYa3h9UvKU3k7LmY0Y1l5mIOUVqQ6JZb2ALXB14OUgTk5CSVVaodu9wJHFO2 MfnjfT2QkQCJsjG8EZ2Y0MeI2Flm3DTOXJEOp4Q66PnDHeAsUiI8IP32G3kbCX8l8XyA TmdA797oPS8qC3bUq1l9ztulv+kYYhiVuY/xG6txPvpB1ID6Zf/eo1r+AWqY7LKgKHBL g4PCQNfXzospr7Yfyxq0beh9fnP4LuZvPu7U+XqELHDuyReRklpYPhgz1+G8J9L73sG6 qULQ== 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; bh=lQ1idLnL2UCMJjEJnkwsAGfziMzzcuwKz3HZqhqoSgY=; b=kn9HIeE3PQllHjjfPoxaW8gPDhiLgDtUQGIzWZgC0vvzIJC06dVAz5oswAa5lu+Ive Q7W+V16kKvIRxAfg6fbhsmrLi2eiIDo4wgicjVRSrhZ772lIqPscNvGjeARGiKDonWOd uCscmmwLqhcrLeEAds4ytGQp280vRB88JSL53PVUeMCieS8+ozYK8+bVuP0dxYbtzhyi 1/TthreXh+/40Y1sUrWWMCqKg/2dJTciA8JQdO0QBs4iRWa1Xm4F8k06/+2H/yzpVnkZ FhvfiJkk4QEy1thTZbzBdroV1Rezfdi6d8yD5LhoY5xD3n64ZS/LBS0tXIAuVmD5t/VA vwUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=YpAt3w8F; 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 z15-20020a056a00240f00b0051bcab048ecsi1658680pfh.178.2022.06.15.23.08.49; Wed, 15 Jun 2022 23:09:10 -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=@infradead.org header.s=bombadil.20210309 header.b=YpAt3w8F; 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 S1358706AbiFPGHV (ORCPT + 99 others); Thu, 16 Jun 2022 02:07:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358907AbiFPGHT (ORCPT ); Thu, 16 Jun 2022 02:07:19 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C06E8CCE; Wed, 15 Jun 2022 23:07:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=lQ1idLnL2UCMJjEJnkwsAGfziMzzcuwKz3HZqhqoSgY=; b=YpAt3w8FxJkqvgT9iUxi24xofx 8+MvlP+t2PLJClmbzMh18BN6ZwDbMmncgLTl17zD+v64zcQMphUoIRaaPqzZ9Kcpf+7tyKKylosSd OBn0bXQZGwNn1yI7B/kUkJqGiMJWwXuRRwgQUA3cJpfiVH00RtuJeKBV1dYTiGYoxczXS8RI9iqPE IKx0AVVX9KzBGe6L7/GrOI+YrFxVeLneipAWwETP8dgETplOiFEcQKIPl+aG6wgIFJdwWuEWPkEWf I0c4yVCYAk3jbyZnzK9cGmY24O5LW7GYL7W6PZ6EU+ypD46A/EQ820J0qw64K/4/XVRxXZkCVCaTN vOIrX+fA==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1iez-000gG0-HX; Thu, 16 Jun 2022 06:07:17 +0000 Date: Wed, 15 Jun 2022 23:07:17 -0700 From: Christoph Hellwig To: Eric Biggers Cc: Christoph Hellwig , Dave Chinner , "Darrick J. Wong" , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, linux-api@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Keith Busch Subject: Re: [RFC PATCH v2 1/7] statx: add I/O alignment information Message-ID: References: <20220518235011.153058-1-ebiggers@kernel.org> <20220518235011.153058-2-ebiggers@kernel.org> <20220520032739.GB1098723@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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 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, Jun 15, 2022 at 05:04:57PM -0700, Eric Biggers wrote: > One more thing. I'm trying to add support for STATX_DIOALIGN on block devices. > Unfortunately I don't think it is going to work, at all, since the inode is for > the device node and not the block device itself. This is true even after the > file is opened (I previously thought that at least that case would work). For an open file the block device inode is pointed to by file->f_mapping->host. > Were you expecting that this would work on block devices? It seems they will > need a different API -- a new BLK* ioctl, or files in /sys/block/$dev/queue. blkdev_get_no_open on inode->i_rdev gets you the block device, which then has bdev->bd_inode point to the underlying block device, although for a block device those limit probably would be retrieved not from the inode but the gendisk / request_queue anyway.