diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-05-01 17:37:59 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-05-01 19:16:43 -0400 |
commit | d69ee9b85541a69a1092f5da675bd23256dc62af (patch) | |
tree | 5f890def2d1d4bca93a5acaf073fa4cbe5f16a44 /include/linux/nfs_fs.h | |
parent | 8582715e733d08bc98fe629db0601360d70de4dc (diff) | |
download | linux-exynos-d69ee9b85541a69a1092f5da675bd23256dc62af.tar.gz linux-exynos-d69ee9b85541a69a1092f5da675bd23256dc62af.tar.bz2 linux-exynos-d69ee9b85541a69a1092f5da675bd23256dc62af.zip |
NFS: Adapt readdirplus to application usage patterns
While the use of READDIRPLUS is significantly more efficient than
READDIR followed by many LOOKUP calls, it is still less efficient
than just READDIR if the attributes are not required.
This patch tracks when lookups are attempted on the directory,
and uses that information to selectively disable READDIRPLUS
on that directory.
The first 'readdir' call is always served using READDIRPLUS.
Subsequent calls only use READDIRPLUS if there was a successful
lookup or revalidation on a child in the mean time.
Credit for the original idea should go to Neil Brown. See:
http://www.spinics.net/lists/linux-nfs/msg19996.html
However, the implementation in this patch differs from Neil's
in that it focuses on tracking lookups rather than calls to
stat().
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Neil Brown <neilb@suse.de>
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r-- | include/linux/nfs_fs.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 8a88c16662c5..6cc7dbaf0695 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -314,11 +314,6 @@ static inline int nfs_server_capable(struct inode *inode, int cap) return NFS_SERVER(inode)->caps & cap; } -static inline int NFS_USE_READDIRPLUS(struct inode *inode) -{ - return test_bit(NFS_INO_ADVISE_RDPLUS, &NFS_I(inode)->flags); -} - static inline void nfs_set_verifier(struct dentry * dentry, unsigned long verf) { dentry->d_time = verf; |