aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-04-03 01:28:45 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-04-03 20:41:19 -0400
commit6668958fac1d05f55420de702f3678d46c1e93a5 (patch)
tree2ee7fe01bb6720ecb1147c5c7f7e3d0289fc71bb /fs/nfsd/nfs4xdr.c
parentdd453dfd70538cadc02cb47ff8d8cfd0cb8cf435 (diff)
nfsd41: stateid handling
When sessions are used, stateful operation sequenceid and stateid handling are not used. When sessions are used, on the first open set the seqid to 1, mark state confirmed and skip seqid processing. When sessionas are used the stateid generation number is ignored when it is zero whereas without sessions bad_stateid or stale stateid is returned. Add flags to propagate session use to all stateful ops and down to check_stateid_generation. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Andy Adamson <andros@netapp.com> [nfsd4_has_session should return a boolean, not u32] Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfsd41: pass nfsd4_compoundres * to nfsd4_process_open1] [nfsd41: calculate HAS_SESSION in nfs4_preprocess_stateid_op] [nfsd41: calculate HAS_SESSION in nfs4_preprocess_seqid_op] 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index c6a726d04efd..dd81ac1a1c6c 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -3194,7 +3194,7 @@ nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compo
3194 iov = &rqstp->rq_res.head[0]; 3194 iov = &rqstp->rq_res.head[0];
3195 iov->iov_len = ((char*)resp->p) - (char*)iov->iov_base; 3195 iov->iov_len = ((char*)resp->p) - (char*)iov->iov_base;
3196 BUG_ON(iov->iov_len > PAGE_SIZE); 3196 BUG_ON(iov->iov_len > PAGE_SIZE);
3197 if (resp->cstate.slot != NULL) { 3197 if (nfsd4_has_session(&resp->cstate)) {
3198 if (resp->cstate.status == nfserr_replay_cache && 3198 if (resp->cstate.status == nfserr_replay_cache &&
3199 !nfsd4_not_cached(resp)) { 3199 !nfsd4_not_cached(resp)) {
3200 iov->iov_len = resp->cstate.iovlen; 3200 iov->iov_len = resp->cstate.iovlen;