Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3974335pxf; Mon, 29 Mar 2021 17:21:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtmvyheLmyGkXs9LlSsAe52X5F0vZmyNKWzQQrdqZOE0L4MtNWutwLmxNqpAb8oq8ikDje X-Received: by 2002:a05:6402:4314:: with SMTP id m20mr30291340edc.5.1617063692879; Mon, 29 Mar 2021 17:21:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617063692; cv=none; d=google.com; s=arc-20160816; b=TEeWBKesYvubdzKDop9KrCCdDmxhh1IE++o8a88TEhFEaoviqbzHYbthcysAEKIxND Ezdtz0FrsmPwRS0rYuqp3bkzopbcHjyPkQR8zjsGhGL/ytMiuWG9aQKRHkVx6GNn6vOQ 8rG1WEWc/H75sXgLUh/OlOA7cQkI6WPXR7p6F/d4O9dzcDb3n8Fmt6dC0tGZC80OxEJ5 s/rgptFg70RjPJeqZp89/VaWXDH8Ope9ptHfJ7fsKKcG9L4ZuDY6QUhyNbDoVuakJAcN vE4/Q5UTW434dJFt5OhogalPiRQhcTY+1g9Q32+HA6s11k2cKrFI0GCUiHNFR8jH0LJ4 WVJQ== 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=seCZBSDrh00UN870COATfocaCkb6aulvpr8DbAUiqRY=; b=sgT0xJgPM99vLdexQpJDTwyQZK7PelGzXzrXymO/G5pP/ZFPhtbH6gtO6oba3LSyfe OV4JDg4LnvvGDvaJL/4KkQQWF4f1c4nbV+tRLbhaUC3BkleCVfl8QBYuascD3Cij8E00 0zNzF+O44VaB61wENE1sUiRgwOx90mL08Q/+OHAUlxDIbp1YMky1kv5c8nx5hzYr4ni2 MA2GtMPNaAN5hW87yHMsXrZTnwkbDwMXTZW1/YgWBHHpDEUrETbYeBOdeEMNzkoqLkth 2g298HsrtnV+dY9BYsJfEtxOb347dlMfhLuDR2BzW0/MlecT0W4VQZ50Ga0t1N/mSAXf JwXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QYvOPsta; 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 t4si14450420ejf.475.2021.03.29.17.21.08; Mon, 29 Mar 2021 17:21:32 -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=QYvOPsta; 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 S229911AbhC3ATO (ORCPT + 99 others); Mon, 29 Mar 2021 20:19:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:50396 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230202AbhC3ASp (ORCPT ); Mon, 29 Mar 2021 20:18:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AF2F16192F for ; Tue, 30 Mar 2021 00:18:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617063524; bh=p/OMKjhUArmSpnat1QOTaqJaDV7aS6IGAzkiE+kmxE8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QYvOPstaB+Ppnnmlfn3Ak1vRUUvzD20LDUGnYry1pMLJ0CcWbVaGqNbfNlfV3DV54 CtbX6vKeeG6mYGHQ7K5cLyi72ygrngVfGyfDaSfTPSy+lnqB/1SgQIQfaQLFKI6DbJ lEHXDPKboZvKHsNFXdRwosCHROKQFj+CffmGg4xten+b6tlo1mTDnqDtCPD9F3yj3Z xMHMOyPe2TNZZtB/fLC0h+hrS7s+mJ/yMQHOT9d9KZpsIk0iYUSOglQCYazVXKTVcC 5YA2EG491XrWeRBE7OGloi6xVPJ+lvlpjmgUJ1+f+iFMDl1wW0LOKUf/ddkWUg167W A8rLxT0b9VsYA== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH 10/17] NFS: Don't set NFS_INO_REVAL_PAGECACHE in the inode cache validity Date: Mon, 29 Mar 2021 20:18:28 -0400 Message-Id: <20210330001835.41914-11-trondmy@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210330001835.41914-10-trondmy@kernel.org> References: <20210330001835.41914-1-trondmy@kernel.org> <20210330001835.41914-2-trondmy@kernel.org> <20210330001835.41914-3-trondmy@kernel.org> <20210330001835.41914-4-trondmy@kernel.org> <20210330001835.41914-5-trondmy@kernel.org> <20210330001835.41914-6-trondmy@kernel.org> <20210330001835.41914-7-trondmy@kernel.org> <20210330001835.41914-8-trondmy@kernel.org> <20210330001835.41914-9-trondmy@kernel.org> <20210330001835.41914-10-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 484e1e3c500e..25dc70adab87 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -218,11 +218,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) @@ -1927,7 +1928,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 */ @@ -1966,7 +1966,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; } @@ -2018,7 +2017,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 2f2cea64f40a..64b3438aed78 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