linux/fs/nfsd
Andy Adamson 49557cc74c nfsd41: Use separate DRC for setclientid
Instead of trying to share the generic 4.1 reply cache code for the
CREATE_SESSION reply cache, it's simpler to handle CREATE_SESSION
separately.

The nfs41 single slot clientid DRC holds the results of create session
processing.  CREATE_SESSION can be preceeded by a SEQUENCE operation
(an embedded CREATE_SESSION) and the create session single slot cache must be
maintained.  nfsd4_replay_cache_entry() and nfsd4_store_cache_entry() do not
implement the replay of an embedded CREATE_SESSION.

The clientid DRC slot does not need the inuse, cachethis or other fields that
the multiple slot session cache uses.  Replace the clientid DRC cache struct
nfs4_slot cache with a new nfsd4_clid_slot cache.  Save the xdr struct
nfsd4_create_session into the cache at the end of processing, and on a replay,
replace the struct for the replay request with the cached version all while
under the state lock.

nfsd4_proc_compound will handle both the solo and embedded CREATE_SESSION case
via the normal use of encode_operation.

Errors that do not change the create session cache:
A create session NFS4ERR_STALE_CLIENTID error means that a client record
(and associated create session slot) could not be found and therefore can't
be changed.  NFSERR_SEQ_MISORDERED errors do not change the slot cache.

All other errors get cached.

Remove the clientid DRC specific check in nfs4svc_encode_compoundres to
put the session only if cstate.session is set which will now always be true.

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2009-07-28 14:30:29 -04:00
..
auth.c nfsd: fix cred leak on every rpc 2009-01-27 17:26:59 -05:00
auth.h nfsd: minor fs/nfsd/auth.h cleanup 2008-02-01 16:42:05 -05:00
export.c Merge branch 'for-2.6.31' of git://fieldses.org/git/linux-nfsd 2009-06-22 12:55:50 -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 knfsd: trivial makefile cleanup 2007-05-09 12:30:54 -07:00
nfs2acl.c nfsd: rename MAY_ flags 2008-06-23 13:02:50 -04:00
nfs3acl.c nfsd: rename MAY_ flags 2008-06-23 13:02:50 -04:00
nfs3proc.c NFS: kill off complicated macro 'PROC' 2009-06-15 19:34:32 -07:00
nfs3xdr.c nfsd: support ext4 i_version 2009-04-29 11:35:49 -04:00
nfs4acl.c nfsd: fix buffer overrun decoding NFSv4 acl 2008-09-01 14:24:24 -04:00
nfs4callback.c nfsd41: Backchannel: minorversion support for the back channel 2009-06-18 18:33:57 -07:00
nfs4idmap.c nfsd: fix sparse warnings 2008-04-23 16:13:39 -04:00
nfs4proc.c nfsd41: Use separate DRC for setclientid 2009-07-28 14:30:29 -04:00
nfs4recover.c nfsd: silence lockdep warning 2009-05-11 17:23:14 -04:00
nfs4state.c nfsd41: Use separate DRC for setclientid 2009-07-28 14:30:29 -04:00
nfs4xdr.c nfsd41: Use separate DRC for setclientid 2009-07-28 14:30:29 -04:00
nfscache.c knfsd: fix reply cache memory corruption 2009-05-27 14:14:02 -04:00
nfsctl.c nfsd: minor write_pool_threads exit cleanup 2009-07-28 14:29:41 -04:00
nfsfh.c knfsd: remove unreported filehandle stats counters 2009-05-27 14:14:03 -04:00
nfsproc.c NFS: kill off complicated macro 'PROC' 2009-06-15 19:34:32 -07:00
nfssvc.c nfsd41: hange from page to memory based drc limits 2009-07-28 14:30:05 -04:00
nfsxdr.c Use struct path in struct svc_export 2008-02-14 21:17:08 -08:00
stats.c [PATCH] knfsd: nfsd4: add per-operation server stats 2006-07-10 13:24:27 -07:00
vfs.c Merge branch 'for-2.6.31' of git://fieldses.org/git/linux-nfsd 2009-06-22 12:55:50 -07:00