aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-04-03 01:28:22 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-04-03 20:41:17 -0400
commitda3846a2866ddf239311766ff434a82e7b4ac701 (patch)
treec40d6c1754999f1f572f12c4fa68f281a93b040c /fs/nfsd/nfs4proc.c
parentc3d06f9ce8544fecfe13e377d1e2c2e47fe18dbc (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/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index ec51936d2ce2..9e2ee75e0f7c 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -936,6 +936,12 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
936 BUG_ON(op->status == nfs_ok); 936 BUG_ON(op->status == nfs_ok);
937 937
938encode_op: 938encode_op:
939 /* Only from SEQUENCE or CREATE_SESSION */
940 if (resp->cstate.status == nfserr_replay_cache) {
941 dprintk("%s NFS4.1 replay from cache\n", __func__);
942 status = op->status;
943 goto out;
944 }
939 if (op->status == nfserr_replay_me) { 945 if (op->status == nfserr_replay_me) {
940 op->replay = &cstate->replay_owner->so_replay; 946 op->replay = &cstate->replay_owner->so_replay;
941 nfsd4_encode_replay(resp, op); 947 nfsd4_encode_replay(resp, op);
@@ -964,6 +970,7 @@ encode_op:
964 status = nfserr_jukebox; 970 status = nfserr_jukebox;
965 } 971 }
966 972
973 resp->cstate.status = status;
967 fh_put(&resp->cstate.current_fh); 974 fh_put(&resp->cstate.current_fh);
968 fh_put(&resp->cstate.save_fh); 975 fh_put(&resp->cstate.save_fh);
969 BUG_ON(resp->cstate.replay_owner); 976 BUG_ON(resp->cstate.replay_owner);