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>
This commit is contained in:
committed by
J. Bruce Fields
parent
c3d06f9ce8
commit
da3846a286
@@ -3049,6 +3049,17 @@ nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compo
|
||||
iov = &rqstp->rq_res.head[0];
|
||||
iov->iov_len = ((char*)resp->p) - (char*)iov->iov_base;
|
||||
BUG_ON(iov->iov_len > PAGE_SIZE);
|
||||
if (resp->cstate.slot != NULL) {
|
||||
if (resp->cstate.status == nfserr_replay_cache) {
|
||||
iov->iov_len = resp->cstate.iovlen;
|
||||
} else {
|
||||
nfsd4_store_cache_entry(resp);
|
||||
dprintk("%s: SET SLOT STATE TO AVAILABLE\n", __func__);
|
||||
resp->cstate.slot->sl_inuse = 0;
|
||||
}
|
||||
if (resp->cstate.session)
|
||||
nfsd4_put_session(resp->cstate.session);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user