Commit 301cca2f authored by Chuck Lever's avatar Chuck Lever Committed by Sasha Levin
Browse files

xprtrdma: Fix handling of RDMA_ERROR replies

commit 7b2182ec


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: default avatarChuck Lever <>
Cc: <>
Signed-off-by: default avatarAnna Schumaker <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 9e2f2568
......@@ -1349,8 +1349,7 @@ rpcrdma_decode_error(struct rpcrdma_xprt *r_xprt, struct rpcrdma_rep *rep,
be32_to_cpup(p), be32_to_cpu(rep->rr_xid));
return -EREMOTEIO;
return -EIO;
/* Perform XID lookup, reconstruction of the RPC reply, and
......@@ -1387,13 +1386,11 @@ void rpcrdma_complete_rqst(struct rpcrdma_rep *rep)
/* If the incoming reply terminated a pending RPC, the next
* RPC call will post a replacement receive buffer as it is
* being marshaled.
rqst->rq_task->tk_status = status;
status = 0;
goto out;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment