Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3798880rwb; Tue, 16 Aug 2022 08:58:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR5gioiwP8pI4nHUR95aRkBSJCxsFXDe2uUzF/cATXkVJFrxgWsXVITLfYnWObyPJWq83qaI X-Received: by 2002:a17:907:2bf7:b0:730:996d:5e8d with SMTP id gv55-20020a1709072bf700b00730996d5e8dmr14280340ejc.382.1660665498438; Tue, 16 Aug 2022 08:58:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660665498; cv=none; d=google.com; s=arc-20160816; b=ZPyUjTxaM2N28JPu4iCvtU4KE+1z3IrrSyGhx59tUZWkFOxX8ytjx2XMrr047keo0a Tzeeti68n4G1BrC61iPS4Tw0+U3VOCSdQoIz18qm1B+v5RkisXM1eFvCOfe9KT4/y40U 3cT0rwitSI1FpWYl6xqAEq/r2Ljria637JDGdBM3Uqk6HznNYuGJWvVivcBnOP/AKJmm u+hQH+uDSSlRhT7pTm5YQyzXCLvRPpOQveqwd7NddCKh3Gfr0nsuZBb12sTswKUtAM+I bhwu99/bADXmDQc86rvOb7iJWuWsoe4Y1e/VuuIf9NkXk2J2z39EuOtvtdjcBdYr/Mfv IYIA== 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=Ww2BT0k680pTeoI8RMgFOQ9mSKLuyykZKYwAuvEyvI4=; b=FOioaZPkfmmD8hn+66LPpIiStXNKhasbK1WfEGHnOYBC7GW6LVBm65/ncr9hJKEFtm h5sM6nVF0iHz5SyyB2zazOr+pQxo61op3aXbd5aQyZFx+8HzS216f/HVM0wbOoIIhdek C7Csq3KWtxtwnZXyfoD8P8QZfR5MQLmGqr1Ck6HYwyGGCfJh1UPfN0LrZ7078efPn63s fmBuz5vptKRdmeKr/rIauZgIEvjqhZptcP+c2najJxnVginYjKsIS7Tgcj7EcnvwzGF6 48khn+95syXgOzvCtz0vFL5nfXz4Ddjc4mM7mg8mG6V4ypfBLzheGB5v7bdkyX+VZDlP Tn4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U3YXgr5o; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne25-20020a1709077b9900b0072b44b630absi10930619ejc.867.2022.08.16.08.57.48; Tue, 16 Aug 2022 08:58:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@kernel.org header.s=k20201202 header.b=U3YXgr5o; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231962AbiHPPzm (ORCPT + 99 others); Tue, 16 Aug 2022 11:55:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236051AbiHPPyt (ORCPT ); Tue, 16 Aug 2022 11:54:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC8A12ED58; Tue, 16 Aug 2022 08:51:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 33FE661138; Tue, 16 Aug 2022 15:51:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8AD68C433D6; Tue, 16 Aug 2022 15:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660665118; bh=YTxB1qQDthA0Qji7+SWwCk9ZE7GAlPwG4Zy7shc1zkI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=U3YXgr5ozgiuShZM4c6NW+lf9bPSdarJdrYyMiGnr9MQD2R1VJeSx6GrRmDEThWE+ rRoR3Od9F6NdexJ/V0UAKm0nLpSj2bMLSWng61OZNocG53jcwzhZeHcn6yi+CgllDH pPqbajiyrmhKgSN48AuyBDvgLgLnvuW1Bh5kxf6ry34hm9WnFoN4ziUjqNTj8SN/8A TR1gwTbfvgDFhELMEkrFG2pgr7ayH+5wOGt3/qdXHRZb99KjXu6HJqJZj0Au08IE4U yBd6QLSKQfw+7myMBzinhXnTFnVgeVxpuJQidHFsLdP240DUobPvgzz2KcmsNFXtNz 1TgpHgzFUKSXg== Date: Tue, 16 Aug 2022 08:51:58 -0700 From: "Darrick J. Wong" To: Jeff Layton Cc: David Howells , Christian Brauner , viro@zeniv.linux.org.uk, linux-afs@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org Subject: Re: [PATCH 1/4] vfs: report change attribute in statx for IS_I_VERSION inodes Message-ID: References: <20220816134419.xra4krb3jwlm4npk@wittgenstein> <20220816132759.43248-1-jlayton@kernel.org> <20220816132759.43248-2-jlayton@kernel.org> <4066396.1660658141@warthog.procyon.org.uk> <12637.1660662903@warthog.procyon.org.uk> <83d07cc4f7fe2ca9976d3f418e5137f354e933a4.camel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83d07cc4f7fe2ca9976d3f418e5137f354e933a4.camel@kernel.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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-nfs@vger.kernel.org On Tue, Aug 16, 2022 at 11:32:24AM -0400, Jeff Layton wrote: > On Tue, 2022-08-16 at 16:15 +0100, David Howells wrote: > > Jeff Layton wrote: > > > > > I think we'll just have to ensure that before we expose this for any > > > filesystem that it conforms to some minimum standards. i.e.: it must > > > change if there are data or metadata changes to the inode, modulo atime > > > changes due to reads on regular files or readdir on dirs. > > > > > > The local filesystems, ceph and NFS should all be fine. I guess that > > > just leaves AFS. If it can't guarantee that, then we might want to avoid > > > exposing the counter for it. > > > > AFS monotonically increments the counter on data changes; doesn't make any > > change for metadata changes (other than the file size). > > > > But you can't assume NFS works as per your suggestion as you don't know what's > > backing it (it could be AFS, for example - there's a converter for that). > > > > In that case, the NFS server must synthesize a proper change attr. The > NFS spec mandates that it change on most metadata changes. > > > Further, for ordinary disk filesystems, two data changes may get elided and > > only increment the counter once. > > > > Not a problem as long as nothing queried the counter in between the > changes. > > > And then there's mmap... > > > > Not sure how that matters here. > > > It might be better to reduce the scope of your definition and just say that it > > must change if there's a data change and may also be changed if there's a > > metadata change. > > > > I'd prefer that we mandate that it change on metadata changes as well. ...in that case, why not leave the i_version bump in xfs_trans_log_inode? That will capture all changes to file data, attribues, and metadata. ;) --D > That's what most of the in-kernel users want, and what most of the > existing filesystems provide. If AFS can't give that guarantee then we > can just omit exposing i_version on it. > -- > Jeff Layton