diff options
author | Andy Adamson <andros@netapp.com> | 2009-04-03 01:28:01 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-04-03 20:41:15 -0400 |
commit | 0733d21338747483985a5964e852af160d88e429 (patch) | |
tree | fb8014cc66d3bfc33e1b7cc6a0da369bccc34cd3 /include/linux/nfsd/state.h | |
parent | 069b6ad4bb20abf175ea7875e82e8002154773af (diff) |
nfsd41: exchange_id operation
Implement the exchange_id operation confoming to
http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-28
Based on the client provided name, hash a client id.
If a confirmed one is found, compare the op's creds and
verifier. If the creds match and the verifier is different
then expire the old client (client re-incarnated), otherwise,
if both match, assume it's a replay and ignore it.
If an unconfirmed client is found, then copy the new creds
and verifer if need update, otherwise assume replay.
The client is moved to a confirmed state on create_session.
In the nfs41 branch set the exchange_id flags to
EXCHGID4_FLAG_USE_NON_PNFS | EXCHGID4_FLAG_SUPP_MOVED_REFER
(pNFS is not supported, Referrals are supported,
Migration is not.).
Address various scenarios from section 18.35 of the spec:
1. Check for EXCHGID4_FLAG_UPD_CONFIRMED_REC_A and set
EXCHGID4_FLAG_CONFIRMED_R as appropriate.
2. Return error codes per 18.35.4 scenarios.
3. Update client records or generate new client ids depending on
scenario.
Note: 18.35.4 case 3 probably still needs revisiting. The handling
seems not quite right.
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Andy Adamosn <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfsd41: use utsname for major_id (and copy to server_scope)]
[nfsd41: fix handling of various exchange id scenarios]
Signed-off-by: Mike Sager <sager@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfsd41: reverse use of EXCHGID4_INVAL_FLAG_MASK_A]
[simplify nfsd4_encode_exchange_id error handling]
[nfsd41: embed an xdr_netobj in nfsd4_exchange_id]
[nfsd41: return nfserr_serverfault for spa_how == SP4_MACH_CRED]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include/linux/nfsd/state.h')
-rw-r--r-- | include/linux/nfsd/state.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index 5b3a6660f3af..8d0b10167937 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h | |||
@@ -173,6 +173,8 @@ struct nfs4_client { | |||
173 | 173 | ||
174 | /* for nfs41 */ | 174 | /* for nfs41 */ |
175 | struct list_head cl_sessions; | 175 | struct list_head cl_sessions; |
176 | u32 cl_seqid; /* seqid for create_session */ | ||
177 | u32 cl_exchange_flags; | ||
176 | }; | 178 | }; |
177 | 179 | ||
178 | /* struct nfs4_client_reset | 180 | /* struct nfs4_client_reset |