android_kernel_xiaomi_sm7250/net/sunrpc
Ricardo Labiaga f4a2e418bf nfs41: Process the RPC call direction
Reading and storing the RPC direction is a three step process.

1. xs_tcp_read_calldir() reads the RPC direction, but it will not store it
in the XDR buffer since the 'struct rpc_rqst' is not yet available.

2. The 'struct rpc_rqst' is obtained during the TCP_RCV_COPY_DATA state.
This state need not necessarily be preceeded by the TCP_RCV_READ_CALLDIR.
For example, we may be reading a continuation packet to a large reply.
Therefore, we can't simply obtain the 'struct rpc_rqst' during the
TCP_RCV_READ_CALLDIR state and assume it's available during TCP_RCV_COPY_DATA.

This patch adds a new TCP_RCV_READ_CALLDIR flag to indicate the need to
read the RPC direction.  It then uses TCP_RCV_COPY_CALLDIR to indicate the
RPC direction needs to be saved after the 'struct rpc_rqst' has been allocated.

3. The 'struct rpc_rqst' is obtained by the xs_tcp_read_data() helper
functions.  xs_tcp_read_common() then saves the RPC direction in the XDR
buffer if TCP_RCV_COPY_CALLDIR is set.  This will happen when we're reading
the data immediately after the direction was read.  xs_tcp_read_common()
then clears this flag.

[was nfs41: Skip past the RPC call direction]
Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfs41: sunrpc: Add RPC direction back into the XDR buffer]
Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfs41: sunrpc: Don't skip past the RPC call direction]
Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
2009-06-17 12:43:46 -07:00
..
auth_gss rpc: add service field to new upcall 2008-12-23 16:19:56 -05:00
xprtrdma Merge branch 'for-2.6.30' of git://linux-nfs.org/~bfields/linux 2009-05-29 08:49:09 -07:00
auth_generic.c SUNRPC: Fix a performance regression in the RPC authentication code 2008-11-20 13:17:40 -08:00
auth_null.c NFSv4: Don't use cred->cr_ops->cr_name in nfs4_proc_setclientid() 2008-04-19 16:54:53 -04:00
auth_unix.c SUNRPC: Use GFP_NOFS when allocating credentials 2008-07-09 12:08:48 -04:00
auth.c Merge branch 'devel' into next 2008-12-30 16:51:43 -05:00
cache.c proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
clnt.c nfs41: Process the RPC call direction 2009-06-17 12:43:46 -07:00
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-04-03 15:24:35 -07:00
Makefile SUNRPC: Add a generic RPC credential 2008-03-14 13:42:38 -04:00
rpc_pipe.c constify dentry_operations: rest 2009-03-27 14:44:03 -04:00
rpcb_clnt.c SUNRPC: rpcb_register() should handle errors silently 2009-03-28 15:59:48 -04:00
sched.c nfs41: sunrpc: Export the call prepare state for session reset 2009-06-17 12:25:07 -07:00
socklib.c SUNRPC: temp var should match return type of xdr_skb_read_actor 2008-01-30 02:05:43 -05:00
stats.c proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
sunrpc_syms.c SUNRPC: Move exported symbol definitions after function declaration part 2 2008-02-01 17:01:24 -05:00
svc_xprt.c Merge branch 'for-2.6.30' of git://linux-nfs.org/~bfields/linux 2009-04-06 13:25:56 -07:00
svc.c Merge branch 'for-2.6.30' of git://linux-nfs.org/~bfields/linux 2009-04-06 13:25:56 -07:00
svcauth_unix.c SUNRPC: The sunrpc server code should not be used by out-of-tree modules 2009-01-07 17:18:42 -05:00
svcauth.c SUNRPC: The sunrpc server code should not be used by out-of-tree modules 2009-01-07 17:18:42 -05:00
svcsock.c nfsd: Revert "svcrpc: take advantage of tcp autotuning" 2009-05-27 18:51:06 -04:00
sysctl.c sunrpc: fix possible overrun on read of /proc/sys/sunrpc/transports 2008-09-01 14:24:24 -04:00
timer.c SUNRPC: add EXPORT_SYMBOL_GPL for generic transport functions 2007-10-09 17:17:36 -04:00
xdr.c SUNRPC: Convert the xdr helpers and rpc_pipefs to EXPORT_SYMBOL_GPL 2008-12-23 15:21:31 -05:00
xprt.c SUNRPC: Fix the problem of EADDRNOTAVAIL syslog floods on reconnect 2009-05-02 16:35:08 -07:00
xprtsock.c nfs41: Process the RPC call direction 2009-06-17 12:43:46 -07:00