kernel-ark/fs/nfsd
Andy Adamson 0733d21338 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>
2009-04-03 17:41:15 -07:00
..
auth.c nfsd: fix cred leak on every rpc 2009-01-27 17:26:59 -05:00
auth.h
export.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2008-10-23 10:22:40 -07:00
Kconfig nfsd : Define NFSD only when FILE_LOCKING is enabled 2009-03-18 17:30:48 -04:00
lockd.c nfsd: common grace period control 2008-10-03 16:19:02 -04:00
Makefile
nfs2acl.c
nfs3acl.c
nfs3proc.c Short write in nfsd becomes a full write to the client 2009-03-18 17:38:40 -04:00
nfs3xdr.c
nfs4acl.c nfsd: fix buffer overrun decoding NFSv4 acl 2008-09-01 14:24:24 -04:00
nfs4callback.c nfsd4: move rpc_client setup to a separate function 2009-03-18 17:38:39 -04:00
nfs4idmap.c
nfs4proc.c nfsd41: proc stubs 2009-04-03 17:41:14 -07:00
nfs4recover.c nfsd4: don't do lookup within readdir in recovery code 2009-03-18 17:38:40 -04:00
nfs4state.c nfsd41: exchange_id operation 2009-04-03 17:41:15 -07:00
nfs4xdr.c nfsd41: exchange_id operation 2009-04-03 17:41:15 -07:00
nfscache.c
nfsctl.c knfsd: add file to export stats about nfsd pools 2009-03-18 17:38:42 -04:00
nfsfh.c NFSD: FIDs need to take precedence over UUIDs 2009-01-07 17:23:07 -05:00
nfsproc.c Short write in nfsd becomes a full write to the client 2009-03-18 17:38:40 -04:00
nfssvc.c knfsd: add file to export stats about nfsd pools 2009-03-18 17:38:42 -04:00
nfsxdr.c
stats.c
vfs.c Inconsistent setattr behaviour 2009-03-18 17:59:37 -04:00