Skip to content

Commit

Permalink
SUNRPC: Fix backchannel reply, again
Browse files Browse the repository at this point in the history
I still see "RPC: Could not send backchannel reply error: -110"
quite often, along with slow-running tests. Debugging shows that the
backchannel is still stumbling when it has to queue a callback reply
on a busy transport.

Note that every one of these timeouts causes a connection loss by
virtue of the xprt_conditional_disconnect() call in that arm of
call_cb_transmit_status().

I found that setting to_maxval is necessary to get the RPC timeout
logic to behave whenever to_exponential is not set.

Fixes: 57331a5 ("NFSv4.1: Use the nfs_client's rpc timeouts for backchannel")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
  • Loading branch information
chucklever authored and Trond Myklebust committed Jun 21, 2024
1 parent 6ba59ff commit 6ddc9de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/sunrpc/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1557,9 +1557,11 @@ void svc_process(struct svc_rqst *rqstp)
*/
void svc_process_bc(struct rpc_rqst *req, struct svc_rqst *rqstp)
{
struct rpc_timeout timeout = {
.to_increment = 0,
};
struct rpc_task *task;
int proc_error;
struct rpc_timeout timeout;

/* Build the svc_rqst used by the common processing routine */
rqstp->rq_xid = req->rq_xid;
Expand Down Expand Up @@ -1612,6 +1614,7 @@ void svc_process_bc(struct rpc_rqst *req, struct svc_rqst *rqstp)
timeout.to_initval = req->rq_xprt->timeout->to_initval;
timeout.to_retries = req->rq_xprt->timeout->to_retries;
}
timeout.to_maxval = timeout.to_initval;
memcpy(&req->rq_snd_buf, &rqstp->rq_res, sizeof(req->rq_snd_buf));
task = rpc_run_bc_task(req, &timeout);

Expand Down

0 comments on commit 6ddc9de

Please sign in to comment.