Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1157857iog; Wed, 15 Jun 2022 23:32:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sKlS4dpE32cpsRba9a0z1YZdyBmObKGp4qfk9aMS/0RmiIksCHJJa7NdodhwJFueFDs51+ X-Received: by 2002:a17:902:f54e:b0:166:3b30:457c with SMTP id h14-20020a170902f54e00b001663b30457cmr3054384plf.1.1655361121412; Wed, 15 Jun 2022 23:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655361121; cv=none; d=google.com; s=arc-20160816; b=umDtELNgQuCUH3Ov1kLbzkVzPt+jrt+rMvdGu6bknk+NvODpMo2lgakCfVCVy93+lN OdhwpQUvKKdOLW5xvM+9K2INjBn2C+5r4AQfMkZKo8U9liwYWP1yOsr602mkN27iVfz/ S3zxM4fTUNNNAWw5oJDpP2dCwEqhZljgGCFRfCOSwVErKdfBDz0mP8TRem4uf8RVbzyG kV6rbvFAS25UTP1pBVmCPrwD6dS/XoY4vLZ99OAvLBliFpIWtbNmc2NsGj7GXCmtWsmq 0JkFPXsVKukZtBbmPZX2+RjtMsbiBTMSQsF1bxF4bDV1vjEFMHAVInWtlm+hVU4ln8uh USvQ== 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=COuN5Zz+YBR/xeVdeWv1MuY4NtQSVs4UMHwcz0WDnnQ=; b=XlDsov2UpHemZfF9N23yyM5SknYQmsmFplBioRrtu+KHwu8lkSICr8NL6IJhoBeiSv p6FC1tc4rzda746enthZaUw3upZYPO5kj2bcLrIR6u4h4PU+dsYTKiBu3+W/t0Ls6tjo Gr40A7daYfFj3VTGdzX0BTkJlQAwc4CQkXOKSmKX2ZSPQpWqISj1s1RjOy52Wf7yzetW 6Qe+18BHkwnv8XswgsQvWpXzTupZYeQ9JIX9Uz5P3CxgCMEwn8foTBUOPOHlQuBwvi6o 43Ke0WlyMqKbt+NsonWVsH1Z9D8ezu1NpHHh9b2rdDL+RJWdVRRDUxToAyt+EsdLxs8J k4iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=26COe9Ev; 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 t4-20020a63d244000000b00408d622b82dsi1629908pgi.136.2022.06.15.23.31.47; Wed, 15 Jun 2022 23:32:01 -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=26COe9Ev; 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 S1359168AbiFPG3w (ORCPT + 99 others); Thu, 16 Jun 2022 02:29:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358783AbiFPG3r (ORCPT ); Thu, 16 Jun 2022 02:29:47 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0BC756B19; Wed, 15 Jun 2022 23:29:45 -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=COuN5Zz+YBR/xeVdeWv1MuY4NtQSVs4UMHwcz0WDnnQ=; b=26COe9EvreWGEeNT1/sD1d3kfz 6eiHSoJj3HJNczxIgN6ZNyHhGyF8lkqwkIOL2rgXq98uxDdUx8uC3Lu2IAjIfP6R/f0aliM5EVC6O 1IhASH35qFwNzseZJ4XUFc3+jdZJ4c7Xluvv7sbbyUQTCbN3yrpBR/WmIvNi7io2ncbPNVRlOnIDy hqQ2OPazzRsUwaxn27aCXA9ZVEcHgflQQLkk46TasGiAi8tRAQZfnChJgkw8OGb0eXj325Mwkt6LL e0wbU4YbmLMbwRPuPBtRocrTHAynRb7PqFxnUF7o6IDlLRxUJhNefflB5q17jn1tsA4Npc8hfXRTy ddSAS+0w==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1j0i-000jIM-EX; Thu, 16 Jun 2022 06:29:44 +0000 Date: Wed, 15 Jun 2022 23:29:44 -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 11:19:32PM -0700, Eric Biggers wrote: > Yes I know that. The issue is that the inode that statx() is operating on is > the device node, so *all* the other statx fields come from that inode. Size, > nlink, uid, gid, mode, timestamps (including btime if the filesystem supports > it), inode number, device number of the containing filesystem, mount ID, etc. > If we were to randomly grab one field from the underlying block device instead, > that would be inconsistent with everything else. At least on XFS we have a magic hardcoded st_blksize for block devices, but it seems like the generic doesn't do that. But I'm really much more worried about an inconsistency where we get usefull information or some special files rather than where we acquire this information from. So I think going to the block device inode, and also going to it for stx_blksize is the right thing as it actually makes the interface useful. We just need a good helper that all getattr implementations can use to be consistent and/or override these fields after the call to ->getattr.