Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4257128rwb; Fri, 30 Sep 2022 15:42:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5/SMcgrFltZX5RBcVxPR6TNSQAfbyYA2aTqfiSlhOb2N5BGXd0nS+F8v0GBef/+xP75TlY X-Received: by 2002:a05:6402:354b:b0:454:5162:42a6 with SMTP id f11-20020a056402354b00b00454516242a6mr9209453edd.281.1664577771795; Fri, 30 Sep 2022 15:42:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664577771; cv=none; d=google.com; s=arc-20160816; b=BDkt3RBHHXecauTfj5gr1azD3xZReG3y4vSbS4HFGr3ZTpXbsiusPOdlr5WaFU0YsO bY6Ba8suhdT6AEr6jKNmr+l+Yl3wMaA5g1OTx9xI0k7BntxTiaLRY0S4YbCb/hFQx1eC ODlmYUnFIL835PpkPFpNIHcH+WfNY7aQ1YVJ0W14Sltl6Ss8wLg6tibRW4BEsbMKXwti 8sdbd8Tu0eO64rT+pfYFoj+T0ehZdCZz9YPHfaUbMyXvhWZIExOC3feOM7o1nYtfEB7D tC/ZUH86jSzSW69hCiKoIWTLociEknu5U4KG2OY/BY3TjIiHkxsPaAvBJaJjsDkXUOvx jKDw== 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=oa5E2N/kwlTxZyqodT5Ypg7ZeroTPDSTWj+HiJotqqM=; b=t93RylG2HUS/Wsod5MlhJ5W8MkusbYnKYf44JCb2cmPcAk6a81IxhNQXgPdORIlLkL 56KcrLYmYibMDKWVni8cXN54+H3RDqY7j7rlKmPeMwpAqW1zR0pImg35B9WN/kg1qHOs XzBUARMaos9UP/4Lmh9M1/VheGoywD44qa7C/1pBnrNtapXlkbVbbTCkcqOleZsLU7qs QFS6maxyObfXmAjNcmYbKBGJQRyTX4GZQnMounAYvKqmthapKXpWhlS/O3mi4QSRjGpa cVMQzbQ1boN2TzHEUoMQwdiZ1NhrthXhIb7D35z3cJzIseDetmLxfM59qShj9qpZ1OHH gIsA== 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 re7-20020a170906d8c700b0077076dec2cdsi2368907ejb.907.2022.09.30.15.42.13; Fri, 30 Sep 2022 15:42:51 -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 S231879AbiI3Wcd (ORCPT + 99 others); Fri, 30 Sep 2022 18:32:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232158AbiI3Wc3 (ORCPT ); Fri, 30 Sep 2022 18:32:29 -0400 Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BEE69166489; Fri, 30 Sep 2022 15:32:24 -0700 (PDT) Received: from dread.disaster.area (pa49-181-106-210.pa.nsw.optusnet.com.au [49.181.106.210]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 078B88AB6CD; Sat, 1 Oct 2022 08:32:19 +1000 (AEST) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1oeOYM-00E7kF-Mx; Sat, 01 Oct 2022 08:32:18 +1000 Date: Sat, 1 Oct 2022 08:32:18 +1000 From: Dave Chinner To: Chuck Lever III Cc: Jeff Layton , Theodore Ts'o , "adilger.kernel@dilger.ca" , "Darrick J. Wong" , Trond Myklebust , Neil Brown , Al Viro , "zohar@linux.ibm.com" , "xiubli@redhat.com" , Lukas Czerner , Jan Kara , Bruce Fields , Christian Brauner , "fweimer@redhat.com" , "linux-btrfs@vger.kernel.org" , linux-fsdevel , Linux Kernel Mailing List , "ceph-devel@vger.kernel.org" , "linux-ext4@vger.kernel.org" , Linux NFS Mailing List , "linux-xfs@vger.kernel.org" Subject: Re: [PATCH v6 6/9] nfsd: use the getattr operation to fetch i_version Message-ID: <20220930223218.GL3600936@dread.disaster.area> References: <20220930111840.10695-1-jlayton@kernel.org> <20220930111840.10695-7-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=VuxAv86n c=1 sm=1 tr=0 ts=63376e77 a=j6JUzzrSC7wlfFge/rmVbg==:117 a=j6JUzzrSC7wlfFge/rmVbg==:17 a=kj9zAlcOel0A:10 a=Qawa6l4ZSaYA:10 a=VwQbUJbxAAAA:8 a=7-415B0cAAAA:8 a=P6V2cQqVOOyE__6v1BQA:9 a=CjuIK1q_8ugA:10 a=AjGcO6oz07-iQ99wixmX:22 a=biEYGPWJfzWAr4FL6Ov7:22 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE 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 Fri, Sep 30, 2022 at 02:34:51PM +0000, Chuck Lever III wrote: > > > > On Sep 30, 2022, at 7:18 AM, Jeff Layton wrote: > > > > Now that we can call into vfs_getattr to get the i_version field, use > > that facility to fetch it instead of doing it in nfsd4_change_attribute. > > > > Neil also pointed out recently that IS_I_VERSION directory operations > > are always logged, > > ^logged^synchronous maybe? A pedantic note, but I think necessary because so many people still get this wrong when it comes to filesystems and IO: synchronous != persistent. Ext4 and XFS both use *asynchronous journalling* - they journal changes first to memory buffers, and only make those recorded changes persistent when they hit internal checkpoint thresholds or something external requires persistence to be guaranteed. ->commit_metadata is the operation filesystems provide the NFS server to *guarantee persistence*. This allows filesystems to use asynchronous journalling for most operations, right up to the point the NFS server requires a change to be persistent. "synchronous operation" is a side effect of guaranteeing persistence on some filesytems and storage media, whereas "synchronous operation" does not provide any guarantee of persistence... IOWs, please talk about persistence guarantees the NFS server application requires and implements, not about the operations (or the nature of the operations) that may be performed by the underlying filesystems to provide that persistence guarantee. Cheers, Dave. -- Dave Chinner david@fromorbit.com