linux-kernel-test/include/linux/sunrpc
Andy Adamson c36fca52f5 NFS refactor nfs_find_client and reference client across callback processing
Fixes a bug where the nfs_client could be freed during callback processing.
Refactor nfs_find_client to use minorversion specific means to locate the
correct nfs_client structure.

In the NFS layer, V4.0 clients are found using the callback_ident field in the
CB_COMPOUND header.  V4.1 clients are found using the sessionID in the
CB_SEQUENCE operation which is also compared against the sessionID associated
with the back channel thread after a successful CREATE_SESSION.

Each of these methods finds the one an only nfs_client associated
with the incoming callback request - so nfs_find_client_next is not needed.

In the RPC layer, the pg_authenticate call needs to find the nfs_client. For
the v4.0 callback service, the callback identifier has not been decoded so a
search by address, version, and minorversion is used.  The sessionid for the
sessions based callback service has (usually) not been set for the
pg_authenticate on a CB_NULL call which can be sent prior to the return
of a CREATE_SESSION call, so the sessionid associated with the back channel
thread is not used to find the client in pg_authenticate for CB_NULL calls.

Pass the referenced nfs_client to each CB_COMPOUND operation being proceesed
via the new cb_process_state structure. The reference is held across
cb_compound processing.

Use the new cb_process_state struct to move the NFS4ERR_RETRY_UNCACHED_REP
processing from process_op into nfs4_callback_sequence where it belongs.

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2011-01-06 14:46:24 -05:00
..
auth_gss.h
auth.h SUNRPC: New xdr_streams XDR decoder API 2010-12-16 12:37:25 -05:00
bc_xprt.h NFS refactor nfs_find_client and reference client across callback processing 2011-01-06 14:46:24 -05:00
cache.h sunrpc: Add routines that allow registering per-net caches 2010-09-27 10:16:11 -04:00
clnt.h SUNRPC: New xdr_streams XDR decoder API 2010-12-16 12:37:25 -05:00
debug.h
gss_api.h
gss_asn1.h
gss_err.h
gss_krb5.h
Kbuild
metrics.h
msg_prot.h
rpc_pipe_fs.h
rpc_rdma.h
sched.h
stats.h sunrpc: Make the /proc/net/rpc appear in net namespaces 2010-09-27 10:16:12 -04:00
svc_rdma.h
svc_xprt.h NFS associate sessionid with callback connection 2011-01-06 14:46:24 -05:00
svc.h
svcauth_gss.h
svcauth.h sunrpc: Add net to pure API calls 2010-09-27 10:16:11 -04:00
svcsock.h SUNRPC register and unregister the back channel transport 2011-01-06 14:46:23 -05:00
timer.h
types.h
xdr.h SUNRPC: New xdr_streams XDR decoder API 2010-12-16 12:37:25 -05:00
xprt.h sunrpc: Tag rpc_xprt with net 2010-10-01 17:18:58 -04:00
xprtrdma.h
xprtsock.h