android_kernel_xiaomi_sdm845/include/linux/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
..
cache.h knfsd: reply cache cleanups 2009-05-27 14:14:02 -04:00
const.h
debug.h
export.h switch rqst_exp_parent() 2009-06-11 21:36:00 -04:00
Kbuild NFSD: Strip __KERNEL__ testing from unexported header files. 2008-04-23 16:13:41 -04:00
nfsd.h nfsd41: hange from page to memory based drc limits 2009-07-28 14:30:05 -04:00
nfsfh.h nfsd: support ext4 i_version 2009-04-29 11:35:49 -04:00
state.h nfsd41: Use separate DRC for setclientid 2009-07-28 14:30:29 -04:00
stats.h Fix a build warning about leaking CONFIG_NFSD to userspace. 2009-03-27 19:48:36 -04:00
syscall.h headers_check fix: nfsd/syscall.h 2009-01-30 23:30:42 +05:30
xdr3.h NFSD: Path name length signage in nfsd request argument structures 2008-02-01 16:42:03 -05:00
xdr4.h nfsd41: Use separate DRC for setclientid 2009-07-28 14:30:29 -04:00
xdr.h NFSD: Path name length signage in nfsd request argument structures 2008-02-01 16:42:03 -05:00