aboutsummaryrefslogtreecommitdiff
path: root/include/linux/nfs_fs.h
diff options
context:
space:
mode:
authorTrond Myklebust2012-05-01 17:37:59 -0400
committerTrond Myklebust2012-05-01 19:16:43 -0400
commitd69ee9b85541a69a1092f5da675bd23256dc62af (patch)
tree5f890def2d1d4bca93a5acaf073fa4cbe5f16a44 /include/linux/nfs_fs.h
parent8582715e733d08bc98fe629db0601360d70de4dc (diff)
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.h5
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;