提交 7a50c60e 编写于 作者: T Trond Myklebust

NFS: Use delegations to optimise ACCESS calls

Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 15860ab1
...@@ -1797,7 +1797,8 @@ static int nfs_access_get_cached(struct inode *inode, struct rpc_cred *cred, str ...@@ -1797,7 +1797,8 @@ static int nfs_access_get_cached(struct inode *inode, struct rpc_cred *cred, str
cache = nfs_access_search_rbtree(inode, cred); cache = nfs_access_search_rbtree(inode, cred);
if (cache == NULL) if (cache == NULL)
goto out; goto out;
if (!time_in_range(jiffies, cache->jiffies, cache->jiffies + nfsi->attrtimeo)) if (!nfs_have_delegation(inode, FMODE_READ) &&
!time_in_range(jiffies, cache->jiffies, cache->jiffies + nfsi->attrtimeo))
goto out_stale; goto out_stale;
res->jiffies = cache->jiffies; res->jiffies = cache->jiffies;
res->cred = cache->cred; res->cred = cache->cred;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册