diff options
author | Benny Halevy <bhalevy@panasas.com> | 2009-04-03 01:28:08 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-04-03 20:41:16 -0400 |
commit | b85d4c01b76f6969a085d07a767fa45225cb14be (patch) | |
tree | 5441d0f6bcec52fab3b81ad4887239ff784c5ad9 /include/linux | |
parent | a1bcecd29cdf1670df6908a620add4211c0abb7a (diff) |
nfsd41: sequence operation
Implement the sequence operation conforming to
http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-26
Check for stale clientid (as derived from the sessionid).
Enforce slotid range and exactly-once semantics using
the slotid and seqid.
If everything went well renew the client lease and
mark the slot INPROGRESS.
Add a struct nfsd4_slot pointer to struct nfsd4_compound_state.
To be used for sessions DRC replay.
[nfsd41: rename sequence catchthis to cachethis]
Signed-off-by: Andy Adamson<andros@netapp.com>
[pulled some code to set cstate->slot from "nfsd DRC logic"]
[use sessionid_lock spin lock]
[nfsd41: use bool inuse for slot state]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfsd: add a struct nfsd4_slot pointer to struct nfsd4_compound_state]
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfsd41: add nfsd4_session pointer to nfsd4_compound_state]
[nfsd41: set cstate session]
[nfsd41: use cstate session in nfsd4_sequence]
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[simplify nfsd4_encode_sequence error handling]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/nfsd/xdr4.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h index 33ee71e988b4..6e28a041008d 100644 --- a/include/linux/nfsd/xdr4.h +++ b/include/linux/nfsd/xdr4.h | |||
@@ -48,6 +48,9 @@ struct nfsd4_compound_state { | |||
48 | struct svc_fh current_fh; | 48 | struct svc_fh current_fh; |
49 | struct svc_fh save_fh; | 49 | struct svc_fh save_fh; |
50 | struct nfs4_stateowner *replay_owner; | 50 | struct nfs4_stateowner *replay_owner; |
51 | /* For sessions DRC */ | ||
52 | struct nfsd4_session *session; | ||
53 | struct nfsd4_slot *slot; | ||
51 | }; | 54 | }; |
52 | 55 | ||
53 | struct nfsd4_change_info { | 56 | struct nfsd4_change_info { |
@@ -358,7 +361,15 @@ struct nfsd4_create_session { | |||
358 | }; | 361 | }; |
359 | 362 | ||
360 | struct nfsd4_sequence { | 363 | struct nfsd4_sequence { |
361 | int foo; /* stub */ | 364 | struct nfs4_sessionid sessionid; /* request/response */ |
365 | u32 seqid; /* request/response */ | ||
366 | u32 slotid; /* request/response */ | ||
367 | u32 maxslots; /* request/response */ | ||
368 | u32 cachethis; /* request */ | ||
369 | #if 0 | ||
370 | u32 target_maxslots; /* response */ | ||
371 | u32 status_flags; /* response */ | ||
372 | #endif /* not yet */ | ||
362 | }; | 373 | }; |
363 | 374 | ||
364 | struct nfsd4_destroy_session { | 375 | struct nfsd4_destroy_session { |