From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB0D9C433FE for ; Fri, 30 Sep 2022 22:32:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232478AbiI3Wcf (ORCPT ); Fri, 30 Sep 2022 18:32:35 -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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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