Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp4106390rwa; Tue, 23 Aug 2022 16:34:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Q3JU/J8uJNjwEz3oivXFrQp2QCdnjs6zHOnWmZ77VVMh1A+V55tbbLKp311XqZ+Qzm8+Y X-Received: by 2002:a05:6402:541:b0:446:fa3e:6eda with SMTP id i1-20020a056402054100b00446fa3e6edamr5332569edx.80.1661297642330; Tue, 23 Aug 2022 16:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661297642; cv=none; d=google.com; s=arc-20160816; b=d17Uhuq4xBODf/1DKXLUskymuW6RAT0JQsDgAZJs878BL7p3Den0lR8kYVh4Js/l0t VJAlxvte2Fq4v1DG8VbkRu5f5gSw+3tN6NPF8kLcNEQ9fPmHjzBgRYS503Hpjj34hu58 Ofdz7HxO+/tO1y6MpIIqwk8a6CDeoGFniJMIw3GQd2dcpo7Xv7ktL5lHThxMPCfFFDpR K5p/p6jPwSCTTGukFeRXg5eYDW1madzQReswqHnyNrB0TcNQIgyHVgyIR7JAi6QE24EB sATIQHniD2FCh7emiveAsSU8M+0vkpiQm3Q30QScRYhqsZTXohYdq/DlxTEjGJ3u9uEG S9Iw== 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; bh=MGTEBRtEC565MUC20l0b4GgYgUwT0bzh4EsMMd6rW3o=; b=HFbJBXfGwneJjHMkEgUkvrMyDLMvqFT+T+wAUUlGBqXDr12i4RKBDs+CMxrifc7RbF dCgBWJvUmG0dDDqNdJNaMWN6lIZaMSYcpnXgNGXnw231KC39FlNb/lgIqM4zEpzHpnzc XWTi4MzjdeOuZR/LjKDJuzOvW8fgKVDZAZBnQMGyd7MPjPtS51ee2LS5ORWiAbWlYB5x qdYnGGdbIsRTT7399OZvUP9wOrWLm4iuhc59sFnY58yYzupC68/gVjecxUQUabVKQWVJ lsErGqQDeliGnrdgQ3PU63Vzf1NpnnyiH5+7oraT/ilP1jh8oHBfcxkfJTLhIKswdz0N 1f6A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hz3-20020a1709072ce300b00730cd8b838bsi802345ejc.556.2022.08.23.16.33.32; Tue, 23 Aug 2022 16:34:02 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231789AbiHWX2g (ORCPT + 99 others); Tue, 23 Aug 2022 19:28:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229558AbiHWX2f (ORCPT ); Tue, 23 Aug 2022 19:28:35 -0400 Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AAAE98A1CA; Tue, 23 Aug 2022 16:28:34 -0700 (PDT) Received: from dread.disaster.area (pa49-195-4-169.pa.nsw.optusnet.com.au [49.195.4.169]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id E209010E8C98; Wed, 24 Aug 2022 09:28:33 +1000 (AEST) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1oQdJw-00Gk9U-Qx; Wed, 24 Aug 2022 09:28:32 +1000 Date: Wed, 24 Aug 2022 09:28:32 +1000 From: Dave Chinner To: NeilBrown Cc: Jeff Layton , Mimi Zohar , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, linux-nfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, Trond Myklebust Subject: Re: [PATCH] iversion: update comments with info about atime updates Message-ID: <20220823232832.GQ3600936@dread.disaster.area> References: <20220822133309.86005-1-jlayton@kernel.org> <18827b350fbf6719733fda814255ec20d6dcf00f.camel@linux.ibm.com> <4cc84440d954c022d0235bf407a60da66a6ccc39.camel@kernel.org> <20220822233231.GJ3600936@dread.disaster.area> <6cbcb33d33613f50dd5e485ecbf6ce7e305f3d6f.camel@kernel.org> <166125468756.23264.2859374883806269821@noble.neil.brown.name> <166129348704.23264.10381335282721356873@noble.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <166129348704.23264.10381335282721356873@noble.neil.brown.name> X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=VuxAv86n c=1 sm=1 tr=0 ts=630562a2 a=FOdsZBbW/tHyAhIVFJ0pRA==:117 a=FOdsZBbW/tHyAhIVFJ0pRA==:17 a=kj9zAlcOel0A:10 a=biHskzXt2R4A:10 a=GcyzOjIWAAAA:8 a=uZvujYp8AAAA:8 a=7-415B0cAAAA:8 a=P-QfJufZ_sklkARv_-sA:9 a=CjuIK1q_8ugA:10 a=RWIgqKacCvQA:10 a=6xFH9qvm82wA:10 a=hQL3dl6oAZ8NdCsdz28n:22 a=SLzB8X_8jTLwj6mN0q5r:22 a=biEYGPWJfzWAr4FL6Ov7:22 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,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-nfs@vger.kernel.org On Wed, Aug 24, 2022 at 08:24:47AM +1000, NeilBrown wrote: > On Tue, 23 Aug 2022, Jeff Layton wrote: > > On Tue, 2022-08-23 at 21:38 +1000, NeilBrown wrote: > > > On Tue, 23 Aug 2022, Jeff Layton wrote: > > > > So, we can refer to that and simply say: > > > > > > > > "If the function updates the mtime or ctime on the inode, then the > > > > i_version should be incremented. If only the atime is being updated, > > > > then the i_version should not be incremented. The exception to this rule > > > > is explicit atime updates via utimes() or similar mechanism, which > > > > should result in the i_version being incremented." > > > > > > Is that exception needed? utimes() updates ctime. > > > > > > https://man7.org/linux/man-pages/man2/utimes.2.html > > > > > > doesn't say that, but > > > > > > https://pubs.opengroup.org/onlinepubs/007904875/functions/utimes.html > > > > > > does, as does the code. > > > > > > > Oh, good point! I think we can leave that out. Even better! > > Further, implicit mtime updates (file_update_time()) also update ctime. > So all you need is > If the function updates the ctime, then i_version should be > incremented. > > and I have to ask - why not just use the ctime? Why have another number > that is parallel? > > Timestamps are updated at HZ (ktime_get_course) which is at most every > millisecond. Kernel time, and therefore timestamps, can go backwards. -Dave. -- Dave Chinner david@fromorbit.com