]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Don't overfill uncached readdir pages
authortrondmy@kernel.org <trondmy@kernel.org>
Wed, 19 Jan 2022 00:25:42 +0000 (19:25 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 2 Feb 2022 15:47:13 +0000 (10:47 -0500)
commitbc32a33ea3c3eae97c530b4f9a37c73ad43c58cd
tree06b7e41b2f76123eb3c61a2cd571191d525886da
parent59e766ff6f8c2d0f016dfe97ff01198e0de898dc
NFS: Don't overfill uncached readdir pages

If we're doing an uncached read of the directory, then we ideally want
to read only the exact set of entries that will fit in the buffer
supplied by the getdents() system call. So unlike the case where we're
reading into the page cache, let's send only one READDIR call, before
trying to fill up the buffer.

Fixes: fe626c88f300 ("NFS: Reduce number of RPC calls when doing uncached readdir")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/dir.c