diff options
author | Andy Adamson <andros@netapp.com> | 2009-04-03 01:28:22 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-04-03 20:41:17 -0400 |
commit | da3846a2866ddf239311766ff434a82e7b4ac701 (patch) | |
tree | c40d6c1754999f1f572f12c4fa68f281a93b040c /fs/nfsd/nfs4state.c | |
parent | c3d06f9ce8544fecfe13e377d1e2c2e47fe18dbc (diff) |
nfsd41: nfsd DRC logic
Replay a request in nfsd4_sequence.
Add a minorversion to struct nfsd4_compound_state.
Pass the current slot to nfs4svc_encode_compound res via struct
nfsd4_compoundres to set an NFSv4.1 DRC entry.
Signed-off-by: Andy Adamson<andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfsd41: use bool inuse for slot state]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfsd41: use cstate session in nfs4svc_encode_compoundres]
[nfsd41 replace nfsd4_set_cache_entry]
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index a37b91dab1bf..e20d4345040f 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -989,6 +989,8 @@ nfsd4_replay_cache_entry(struct nfsd4_compoundres *resp) | |||
989 | } | 989 | } |
990 | 990 | ||
991 | resp->rqstp->rq_resused = entry->ce_resused; | 991 | resp->rqstp->rq_resused = entry->ce_resused; |
992 | resp->opcnt = entry->ce_opcnt; | ||
993 | resp->cstate.iovlen = entry->ce_datav.iov_len + entry->ce_rpchdrlen; | ||
992 | status = entry->ce_status; | 994 | status = entry->ce_status; |
993 | 995 | ||
994 | return status; | 996 | return status; |
@@ -1214,6 +1216,10 @@ nfsd4_sequence(struct svc_rqst *rqstp, | |||
1214 | if (status == nfserr_replay_cache) { | 1216 | if (status == nfserr_replay_cache) { |
1215 | cstate->slot = slot; | 1217 | cstate->slot = slot; |
1216 | cstate->session = session; | 1218 | cstate->session = session; |
1219 | /* Return the cached reply status and set cstate->status | ||
1220 | * for nfsd4_svc_encode_compoundres processing*/ | ||
1221 | status = nfsd4_replay_cache_entry(resp); | ||
1222 | cstate->status = nfserr_replay_cache; | ||
1217 | goto replay_cache; | 1223 | goto replay_cache; |
1218 | } | 1224 | } |
1219 | if (status) | 1225 | if (status) |