aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2022-02-07 13:37:00 -0500
committerTrond Myklebust <trond.myklebust@hammerspace.com>2022-03-02 08:43:38 -0500
commit580f236737d13ee25d5b0b1d124f50014fe6833b (patch)
treed139d59e0826080269b22b243829a6e298c3a62c /include
parentNFS: Don't advance the page pointer unless the page is full (diff)
downloadlinux-dev-580f236737d13ee25d5b0b1d124f50014fe6833b.tar.xz
linux-dev-580f236737d13ee25d5b0b1d124f50014fe6833b.zip
NFS: Adjust the amount of readahead performed by NFS readdir
The current NFS readdir code will always try to maximise the amount of readahead it performs on the assumption that we can cache anything that isn't immediately read by the process. There are several cases where this assumption breaks down, including when the 'ls -l' heuristic kicks in to try to force use of readdirplus as a batch replacement for lookup/getattr. This patch therefore tries to tone down the amount of readahead we perform, and adjust it to try to match the amount of data being requested by user space. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'include')
-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 1c533f2c1f36..691a27936849 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -107,6 +107,7 @@ struct nfs_open_dir_context {
__u64 dup_cookie;
__u64 last_cookie;
pgoff_t page_index;
+ unsigned int dtsize;
signed char duped;
bool eof;
};