diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2022-02-22 08:59:33 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2022-03-02 08:43:38 -0500 |
commit | 728dd0ab37421396927749fc8cec9c2009c526c8 (patch) | |
tree | ed2e2eb88ffafa5d64fad9be45a14c2a5a15f5de /include | |
parent | d09e673f497164442ad7976a870d7cc857783fd4 (diff) | |
download | linux-stable-728dd0ab37421396927749fc8cec9c2009c526c8.tar.gz linux-stable-728dd0ab37421396927749fc8cec9c2009c526c8.tar.bz2 linux-stable-728dd0ab37421396927749fc8cec9c2009c526c8.zip |
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')
-rw-r--r-- | include/linux/nfs_fs.h | 1 |
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; |