nfs41: Add ability to read RPC call direction on TCP stream.
authorRicardo Labiaga <Ricardo.Labiaga@netapp.com>
Wed, 1 Apr 2009 13:22:53 +0000 (09:22 -0400)
committerBenny Halevy <bhalevy@panasas.com>
Wed, 17 Jun 2009 19:43:45 +0000 (12:43 -0700)
commit18dca02aeb3c49dfce87c76be643b139d05cf647
tree3e261efdba69b967500a36d8f65ac643c8693d76
parent34dc1ad752ad3f55b2a6e6cd8cfcf3504682fec7
nfs41: Add ability to read RPC call direction on TCP stream.

NFSv4.1 callbacks can arrive over an existing connection. This patch adds
the logic to read the RPC call direction (call or reply). It does this by
updating the state machine to look for the call direction invoking
xs_tcp_read_calldir(...) after reading the XID.

[nfs41: Keep track of RPC call/reply direction with a flag]

As per 11/14/08 review of RFC 53/85.

Add a new flag to track whether the incoming message is an RPC call or an
RPC reply.  TCP_RPC_REPLY is set in the 'struct sock_xprt' tcp_flags in
xs_tcp_read_calldir() if the message is an RPC reply sent on the forechannel.
It is cleared if the message is an RPC request sent on the back channel.

Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
net/sunrpc/xprtsock.c