summaryrefslogtreecommitdiffstats
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
authorRicardo Labiaga2009-04-01 15:22:54 +0200
committerBenny Halevy2009-06-17 21:43:46 +0200
commitf4a2e418bfd03a1f25f515e8a92ecd584d96cfc1 (patch)
tree31ea603214b4c68c338af9373b85eedfe0c11275 /fs/nfs/client.c
parentnfs41: Add ability to read RPC call direction on TCP stream. (diff)
downloadkernel-qcow2-linux-f4a2e418bfd03a1f25f515e8a92ecd584d96cfc1.tar.gz
kernel-qcow2-linux-f4a2e418bfd03a1f25f515e8a92ecd584d96cfc1.tar.xz
kernel-qcow2-linux-f4a2e418bfd03a1f25f515e8a92ecd584d96cfc1.zip
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>
Diffstat (limited to 'fs/nfs/client.c')
0 files changed, 0 insertions, 0 deletions