]> git.baikalelectronics.ru Git - kernel.git/commit
xprtrdma: Fix handling of RDMA_ERROR replies
authorChuck Lever <chuck.lever@oracle.com>
Mon, 15 Jun 2020 13:21:13 +0000 (09:21 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 22 Jun 2020 13:34:35 +0000 (09:34 -0400)
commit9cab3675c03c4f4694798ba3bceb28f6b3eade32
treef8744753ffc67508ffba1f09ef9845ba6a3e9e39
parent436d943ca8c59cf79a4b90d3b53b49146f8929fc
xprtrdma: Fix handling of RDMA_ERROR replies

The RPC client currently doesn't handle ERR_CHUNK replies correctly.
rpcrdma_complete_rqst() incorrectly passes a negative number to
xprt_complete_rqst() as the number of bytes copied. Instead, set
task->tk_status to the error value, and return zero bytes copied.

In these cases, return -EIO rather than -EREMOTEIO. The RPC client's
finite state machine doesn't know what to do with -EREMOTEIO.

Additional clean ups:
- Don't double-count RDMA_ERROR replies
- Remove a stale comment

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: <stable@kernel.vger.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/rpc_rdma.c