diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-11-07 04:47:05 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-12-02 22:05:52 +0300 |
commit | 794092c57f89c2c833da00f82f38a0afcb4033bc (patch) | |
tree | b5f6e8a2b84eb4e959ad99d34265b4e98d11ac05 /net/sunrpc/xprtrdma/module.c | |
parent | 35df59d3ef693292840a61cdb04b39d8c9412f4e (diff) | |
download | linux-794092c57f89c2c833da00f82f38a0afcb4033bc.tar.xz |
NFS: Do uncached readdir when we're seeking a cookie in an empty page cache
If the directory is changing, causing the page cache to get invalidated
while we are listing the contents, then the NFS client is currently forced
to read in the entire directory contents from scratch, because it needs
to perform a linear search for the readdir cookie. While this is not
an issue for small directories, it does not scale to directories with
millions of entries.
In order to be able to deal with large directories that are changing,
add a heuristic to ensure that if the page cache is empty, and we are
searching for a cookie that is not the zero cookie, we just default to
performing uncached readdir.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Tested-by: Benjamin Coddington <bcodding@redhat.com>
Tested-by: Dave Wysochanski <dwysocha@redhat.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/module.c')
0 files changed, 0 insertions, 0 deletions