From: trondmy@kernel.org
To: linux-nfs@vger.kernel.org
Subject: [PATCH 3/5] NFS: Fix up nfs_readdir_inode_mapping_valid()
Date: Wed, 29 Sep 2021 09:49:42 -0400 [thread overview]
Message-ID: <20210929134944.632844-3-trondmy@kernel.org> (raw)
In-Reply-To: <20210929134944.632844-2-trondmy@kernel.org>
From: Trond Myklebust <trond.myklebust@hammerspace.com>
The check for duplicate readdir cookies should only care if the change
attribute is invalid or the data cache is invalid.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
fs/nfs/dir.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index f2df664db020..fa4d33687d2b 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -411,7 +411,8 @@ static int nfs_readdir_search_for_pos(struct nfs_cache_array *array,
static bool
nfs_readdir_inode_mapping_valid(struct nfs_inode *nfsi)
{
- if (nfsi->cache_validity & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA))
+ if (nfsi->cache_validity & (NFS_INO_INVALID_CHANGE |
+ NFS_INO_INVALID_DATA))
return false;
smp_rmb();
return !test_bit(NFS_INO_INVALIDATING, &nfsi->flags);
--
2.31.1
next prev parent reply other threads:[~2021-09-29 13:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-29 13:49 [PATCH 1/5] NFS: Don't set NFS_INO_DATA_INVAL_DEFER and NFS_INO_INVALID_DATA trondmy
2021-09-29 13:49 ` [PATCH 2/5] NFS: Ignore the directory size when marking for revalidation trondmy
2021-09-29 13:49 ` trondmy [this message]
2021-09-29 13:49 ` [PATCH 4/5] NFS: Further optimisations for 'ls -l' trondmy
2021-09-29 13:49 ` [PATCH 5/5] NFS: Fix dentry verifier races trondmy
2021-09-29 14:56 ` [PATCH 4/5] NFS: Further optimisations for 'ls -l' Benjamin Coddington
2021-09-29 16:23 ` Trond Myklebust
2021-09-29 20:21 ` Benjamin Coddington
2021-09-29 20:35 ` Trond Myklebust
2021-09-30 14:29 ` Benjamin Coddington
2021-09-30 14:51 ` Trond Myklebust
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210929134944.632844-3-trondmy@kernel.org \
--to=trondmy@kernel.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).