summaryrefslogtreecommitdiff
path: root/include/linux/nfs_fs.h
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2022-02-22 08:59:33 -0500
committerTrond Myklebust <trond.myklebust@hammerspace.com>2022-03-02 08:43:38 -0500
commit728dd0ab37421396927749fc8cec9c2009c526c8 (patch)
treeed2e2eb88ffafa5d64fad9be45a14c2a5a15f5de /include/linux/nfs_fs.h
parentd09e673f497164442ad7976a870d7cc857783fd4 (diff)
NFS: Don't re-read the entire page cache to find the next cookie
If the page cache entry that was last read gets invalidated for some reason, then make sure we can re-create it on the next call to readdir. This, combined with the cache page validation, allows us to reuse the cached value of page-index on successive calls to nfs_readdir. Credit is due to Benjamin Coddington for showing that the concept works, and that it allows for improved cache sharing between processes even in the case where pages are lost due to LRU or active invalidation. Suggested-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r--include/linux/nfs_fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 6e10725887d1..1c533f2c1f36 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -105,6 +105,7 @@ struct nfs_open_dir_context {
__be32 verf[NFS_DIR_VERIFIER_SIZE];
__u64 dir_cookie;
__u64 dup_cookie;
+ __u64 last_cookie;
pgoff_t page_index;
signed char duped;
bool eof;