Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp49002pxb; Wed, 14 Apr 2021 09:09:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnTo2dWwfgBmvq+ePVYqPZgZIH+7T7AzVisxAGfC0PTRMS1w08O2fR1T2u0cmW68FK+axs X-Received: by 2002:a17:907:75d5:: with SMTP id jl21mr18629928ejc.408.1618416555534; Wed, 14 Apr 2021 09:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618416555; cv=none; d=google.com; s=arc-20160816; b=Psy5lw3/L+A+l9gyNcyFX9OtIsUHq6YSsk0SyFl9dNDgRTBG/tLpX4nz5QybldpAHS ovMlOHf35RBFEZ1t5u0XHEtc9Ijyef4/x2wg7fXsoAhN0PoblGNxXb/LlShdOEAAJDsa BN+CaJpUgVbbBEEm8Xyc6hC1T1bPXb0EI48q3XT1m1qK19nxXyBiQnUQy+tkHnuh975W frlS7vSTxUoz5ZOG+oEZBrR6xCxRFZil8vGFHNI6XzZbDekOXWzYWc/fuwl4mWD3YhzU QXNMPKbOibN+j3U4jRp6u2qVfHA8jUa4+HKbNIyvBDUFeT08JHtEAjlsxQuc/Hb2Nhpl pv+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ZMVcEHuDsqE2zeEv0xMJKA48fnQgF8v0oUwbGiBS7Q4=; b=S55jtJSH1ShqJN0n6PJyGz4r4XVDg0NKiv8EkGExutnLtqCeoMkqM00OB+T16iwdWv JrVVJ7z/uLMp+XJVNC7L+nwVDVDodfr9QV+1crq60gCVjP8yLQ1FbuU7KcvTQvhayHhM SudLUxpgBFWL+pQoiNlC/Iw91V4BqY7kMh317M+OmX9WZJ6v+rz0Fnm1uq7EIlWwRUa4 KwrEBysJgENZb+JjayVj46vVXWaDirQoBKsTHcY0DNMgqiy3pv9LKN0+bfZ5HzVLQuru CNP3Quw2Oavws2WN/zf+HpRP6OmNwUdiHPb/ckRaXHwCB8RBZVySN+X1EQoW5nJlYrCV oiOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h8sU9MAl; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si14264307ejm.206.2021.04.14.09.08.53; Wed, 14 Apr 2021 09:09:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h8sU9MAl; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 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 S1351553AbhDNNoh (ORCPT + 99 others); Wed, 14 Apr 2021 09:44:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:52150 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351597AbhDNNoV (ORCPT ); Wed, 14 Apr 2021 09:44:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D927761220 for ; Wed, 14 Apr 2021 13:43:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618407840; bh=eWTSfJFUyDNCFE1PXB3MjMvAFXodJMQEQV4qpSD4Bqk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=h8sU9MAlp0rWysm3gt6ba5oh6Y/tuNwzePptIQptD8D61YGx1lJDI7ZjmYlnkgzUN f9QQ/tBFgjEbq77fqj0UDIAWDEQQcMhkdnjevSM8Htuf8JM3L2MaDx/fX6rn8cGjFv WdrxPP5xAiNmHHCUSNetpCjhOxRx7iGUFEAIf705GbWtigk/VQKFxMQs2ZkpVYeruW ZCl7PmT5IghVA62gx/JayASWL64MSzCpuqLVKtXjxv65gCfTg/AUEd7AD0Q8HT143M uQzgcBfs1XmBpPImytvulgFxECF8oxrz5JKLb3JOR01IubZUH/gjEDnCNFT38Ft7iZ 9zO8sa2y0KEyw== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH v2 11/26] NFS: Don't set NFS_INO_REVAL_PAGECACHE in the inode cache validity Date: Wed, 14 Apr 2021 09:43:38 -0400 Message-Id: <20210414134353.11860-12-trondmy@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210414134353.11860-11-trondmy@kernel.org> References: <20210414134353.11860-1-trondmy@kernel.org> <20210414134353.11860-2-trondmy@kernel.org> <20210414134353.11860-3-trondmy@kernel.org> <20210414134353.11860-4-trondmy@kernel.org> <20210414134353.11860-5-trondmy@kernel.org> <20210414134353.11860-6-trondmy@kernel.org> <20210414134353.11860-7-trondmy@kernel.org> <20210414134353.11860-8-trondmy@kernel.org> <20210414134353.11860-9-trondmy@kernel.org> <20210414134353.11860-10-trondmy@kernel.org> <20210414134353.11860-11-trondmy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust It is no longer necessary to preserve the NFS_INO_REVAL_PAGECACHE flag. Signed-off-by: Trond Myklebust --- fs/nfs/inode.c | 6 ++---- fs/nfs/nfs4proc.c | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index aec402d048eb..3d18e66a4b8f 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -202,11 +202,12 @@ void nfs_set_cache_invalid(struct inode *inode, unsigned long flags) flags &= ~NFS_INO_INVALID_OTHER; flags &= ~(NFS_INO_INVALID_CHANGE | NFS_INO_INVALID_SIZE - | NFS_INO_REVAL_PAGECACHE | NFS_INO_INVALID_XATTR); } else if (flags & NFS_INO_REVAL_PAGECACHE) flags |= NFS_INO_INVALID_CHANGE | NFS_INO_INVALID_SIZE; + flags &= ~NFS_INO_REVAL_PAGECACHE; + if (!nfs_has_xattr_cache(nfsi)) flags &= ~NFS_INO_INVALID_XATTR; if (flags & NFS_INO_INVALID_DATA) @@ -1917,7 +1918,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) nfsi->cache_validity &= ~(NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ATIME | NFS_INO_REVAL_FORCED - | NFS_INO_REVAL_PAGECACHE | NFS_INO_INVALID_BLOCKS); /* Do atomic weak cache consistency updates */ @@ -1956,7 +1956,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) } else { nfsi->cache_validity |= save_cache_validity & (NFS_INO_INVALID_CHANGE - | NFS_INO_REVAL_PAGECACHE | NFS_INO_REVAL_FORCED); cache_revalidated = false; } @@ -2008,7 +2007,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) } else { nfsi->cache_validity |= save_cache_validity & (NFS_INO_INVALID_SIZE - | NFS_INO_REVAL_PAGECACHE | NFS_INO_REVAL_FORCED); cache_revalidated = false; } diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index a21311520404..a490f1373765 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1191,7 +1191,6 @@ nfs4_update_changeattr_locked(struct inode *inode, cache_validity |= NFS_INO_INVALID_CTIME | NFS_INO_INVALID_MTIME; if (cinfo->atomic && cinfo->before == inode_peek_iversion_raw(inode)) { - nfsi->cache_validity &= ~NFS_INO_REVAL_PAGECACHE; nfsi->attrtimeo_timestamp = jiffies; } else { if (S_ISDIR(inode->i_mode)) { -- 2.30.2