aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.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/nfs4xdr.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/nfs4xdr.c')
-rw-r--r--fs/nfsd/nfs4xdr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 8556575480ce..09415bcf078e 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -3049,6 +3049,17 @@ nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compo
3049 iov = &rqstp->rq_res.head[0]; 3049 iov = &rqstp->rq_res.head[0];
3050 iov->iov_len = ((char*)resp->p) - (char*)iov->iov_base; 3050 iov->iov_len = ((char*)resp->p) - (char*)iov->iov_base;
3051 BUG_ON(iov->iov_len > PAGE_SIZE); 3051 BUG_ON(iov->iov_len > PAGE_SIZE);
3052 if (resp->cstate.slot != NULL) {
3053 if (resp->cstate.status == nfserr_replay_cache) {
3054 iov->iov_len = resp->cstate.iovlen;
3055 } else {
3056 nfsd4_store_cache_entry(resp);
3057 dprintk("%s: SET SLOT STATE TO AVAILABLE\n", __func__);
3058 resp->cstate.slot->sl_inuse = 0;
3059 }
3060 if (resp->cstate.session)
3061 nfsd4_put_session(resp->cstate.session);
3062 }
3052 return 1; 3063 return 1;
3053} 3064}
3054 3065