diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-04-23 14:31:19 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-04-23 14:31:19 -0400 |
commit | 8188df1733d6722336e287cc859b2567ad70576a (patch) | |
tree | 0bb4b41f1405f5b21f49f6451ab21671301b7255 | |
parent | fd068b200fb86e8fa52368e6f6088d2ab297a5d7 (diff) |
NFSv4.1: Use the more efficient open_noattr call for open-by-filehandle
When we're doing open-by-filehandle in NFSv4.1, we shouldn't need to
do the cache consistency revalidation on the directory. It is
therefore more efficient to just use open_noattr, which returns the
file attributes, but not the directory attributes.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r-- | fs/nfs/nfs4proc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index c13144911d20..a411a53d8f4a 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -1549,9 +1549,13 @@ static void nfs4_open_prepare(struct rpc_task *task, void *calldata) | |||
1549 | } | 1549 | } |
1550 | /* Update client id. */ | 1550 | /* Update client id. */ |
1551 | data->o_arg.clientid = clp->cl_clientid; | 1551 | data->o_arg.clientid = clp->cl_clientid; |
1552 | if (data->o_arg.claim == NFS4_OPEN_CLAIM_PREVIOUS) { | 1552 | switch (data->o_arg.claim) { |
1553 | task->tk_msg.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_OPEN_NOATTR]; | 1553 | case NFS4_OPEN_CLAIM_PREVIOUS: |
1554 | case NFS4_OPEN_CLAIM_DELEG_CUR_FH: | ||
1555 | case NFS4_OPEN_CLAIM_DELEG_PREV_FH: | ||
1554 | data->o_arg.open_bitmap = &nfs4_open_noattr_bitmap[0]; | 1556 | data->o_arg.open_bitmap = &nfs4_open_noattr_bitmap[0]; |
1557 | case NFS4_OPEN_CLAIM_FH: | ||
1558 | task->tk_msg.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_OPEN_NOATTR]; | ||
1555 | nfs_copy_fh(&data->o_res.fh, data->o_arg.fh); | 1559 | nfs_copy_fh(&data->o_res.fh, data->o_arg.fh); |
1556 | } | 1560 | } |
1557 | data->timestamp = jiffies; | 1561 | data->timestamp = jiffies; |