Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30483700rwd; Thu, 6 Jul 2023 06:38:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlGI49hRz36WjB/JbvsAOWMs+3y7p204y60hnZOagJq/9XwCeco5p1aKh+CYNn3IKowhEun1 X-Received: by 2002:a17:90b:4b41:b0:263:e423:5939 with SMTP id mi1-20020a17090b4b4100b00263e4235939mr1480940pjb.28.1688650719330; Thu, 06 Jul 2023 06:38:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688650719; cv=none; d=google.com; s=arc-20160816; b=T08LKbC6w+ivomAJACaNFQyp3BJaNuLAMbnJduEVmdR3zw/sIyRk8FYshQcwLbogEj ej3mbk2Gf97fvu4sWAlX6RpHSgrIr8+sHgBAftS22PnZGdfh+f6QuCpsf1LpFAeMKR0z 41anHo2O4iqiD17nw8TJEpWGJvJ2GTNEjZQBzq4f1b3fgS5m0QkKr6fVfrq13yeffnWI XGocmHVd6f0u6fa+mSmnIuiaZwK9UGsL9Aqfowk4NKX9BJwjd+PynJn67oa2cRXZaFdp vWmkOXJJY0yvo1Hb/q3EiHEOrDJydlcTW/Ej4CFLBTQxf36plRxMa1XmINuPQa4NKq97 HpTg== 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 :dkim-signature; bh=+HWAIIhhV1bbuzI9bn8sagrmpXmB6BY8CYYY/NSQTwM=; fh=c2uNIBjJkJWAFFThb1UNB7sWqYEWtqHy5Nr4sjok8js=; b=bcQF5QCiJkmnpADJps6fvQ0Z1IYB6voHHZUJBh+g8YzxWsgsFW9+6xULl0+wWUSFeD X2k5r5AcaaSomatVLrHxuxwVM15NL3XwV2Ro2/CJi+Mx7t6ir/sXZDbMKdihdFqbYwHm g/mKfalymqqPq3N6qRdMP+E0Pc/ltCY296LrlemadAFVgvNLh/CF9SvMqkB1csyOxKFx T2xxnjZtkgWWQb4g/pmrCoWGpzjECBq9+Eft5UQugxonelL33W87iODwMjifCRtTEppa eEfvI1WkGJnwgNhxTeJIi4By97lzrmeVEYMXt79ziSHw+8iHpDPNAm32UHpU9XvA0hph 3efA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=npaGavp6; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=EamnCtiW; 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 e2-20020a17090a630200b00263f73da470si1516687pjj.64.2023.07.06.06.38.19; Thu, 06 Jul 2023 06:38:39 -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=@suse.cz header.s=susede2_rsa header.b=npaGavp6; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=EamnCtiW; 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 S231769AbjGFNea (ORCPT + 99 others); Thu, 6 Jul 2023 09:34:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229555AbjGFNe3 (ORCPT ); Thu, 6 Jul 2023 09:34:29 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B053F1996; Thu, 6 Jul 2023 06:34:27 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 68C7421B05; Thu, 6 Jul 2023 13:34:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688650466; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+HWAIIhhV1bbuzI9bn8sagrmpXmB6BY8CYYY/NSQTwM=; b=npaGavp6icAn1NmRjA9mKQDvfWmqXbyKpBHBZr1tu6i8zpkXeKW3rOP6f8uzseYID9+vXz NsWzXJrKKb6lvLciPYWsM/tfBLa6vE62JeDrc61WKqHz12fBmeAIOqgkdjbuVJVjuVHp9Q 9RrXPM1oC2eG7HbQ5w4193yqb4ruPGE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688650466; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+HWAIIhhV1bbuzI9bn8sagrmpXmB6BY8CYYY/NSQTwM=; b=EamnCtiW/jL/E0B3FI40IZChzyblMMUeCqgK2LZ6EQpUEWQGipeXUAU1IBq8i+Kv4XoDda yNP2u3/6t5/edjCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5AA63138EE; Thu, 6 Jul 2023 13:34:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id w6EgFuLCpmQqWgAAMHmgww (envelope-from ); Thu, 06 Jul 2023 13:34:26 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id F11EBA0707; Thu, 6 Jul 2023 15:34:25 +0200 (CEST) Date: Thu, 6 Jul 2023 15:34:25 +0200 From: Jan Kara To: Jeff Layton Cc: Christian Brauner , Chuck Lever , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org Subject: Re: [PATCH v2 58/92] nfsd: convert to ctime accessor functions Message-ID: <20230706133425.ahb7vxida6hks6z7@quack3> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> <20230705190309.579783-56-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230705190309.579783-56-jlayton@kernel.org> X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL,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 05-07-23 15:01:23, Jeff Layton wrote: > In later patches, we're going to change how the inode's ctime field is > used. Switch to using accessor functions instead of raw accesses of > inode->i_ctime. > > Acked-by: Chuck Lever > Signed-off-by: Jeff Layton Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/nfsd/nfsctl.c | 2 +- > fs/nfsd/vfs.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c > index 1b8b1aab9a15..a53c5660a8c4 100644 > --- a/fs/nfsd/nfsctl.c > +++ b/fs/nfsd/nfsctl.c > @@ -1131,7 +1131,7 @@ static struct inode *nfsd_get_inode(struct super_block *sb, umode_t mode) > /* Following advice from simple_fill_super documentation: */ > inode->i_ino = iunique(sb, NFSD_MaxReserved); > inode->i_mode = mode; > - inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); > + inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); > switch (mode & S_IFMT) { > case S_IFDIR: > inode->i_fop = &simple_dir_operations; > diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c > index 8a2321d19194..40a68bae88fc 100644 > --- a/fs/nfsd/vfs.c > +++ b/fs/nfsd/vfs.c > @@ -520,7 +520,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, > > nfsd_sanitize_attrs(inode, iap); > > - if (check_guard && guardtime != inode->i_ctime.tv_sec) > + if (check_guard && guardtime != inode_get_ctime(inode).tv_sec) > return nfserr_notsync; > > /* > -- > 2.41.0 > -- Jan Kara SUSE Labs, CR