]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
NFS: always treat the invocation of nfs_getattr as cache hit when noac is on
authorHou Tao <houtao1@huawei.com>
Fri, 28 Apr 2017 10:35:19 +0000 (18:35 +0800)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 5 May 2017 17:01:32 +0000 (13:01 -0400)
commit59b86d85a7a30ba56289cdac83cd66a7dd2adebf
treea0cbecb6dc4b59e6323fe5236caa37610f1e8223
parent5c737cb29977896eb0f373d3adbcdea73b815808
NFS: always treat the invocation of nfs_getattr as cache hit when noac is on

When using 'ls -l' to display a large directory, if noac option is used,
in function nfs_getattr() nfs_need_revalidate_inode() will always be true
for NFSv3 and the nfs_entry cache of the directory will be flushed. The
flush will lead to a fully reread of the directory entries from server.

To prevent the unnecessary RPCs, we need to check whether or not the
noac option is used, and always report the invocation of nfs_getattr()
as cache hit instead cache miss when it's on.

Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/inode.c