Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3832591e authored by Trond Myklebust's avatar Trond Myklebust
Browse files

SUNRPC: Handle connection issues correctly on the back channel



If the back channel is disconnected, we can and should just fail the
transmission. The expectation is that the NFSv4.1 server will always
retransmit any outstanding callbacks once the connection is
re-established.

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent dfad7000
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -1031,6 +1031,7 @@ struct rpc_task *rpc_run_bc_task(struct rpc_rqst *req)
	struct xdr_buf *xbufp = &req->rq_snd_buf;
	struct xdr_buf *xbufp = &req->rq_snd_buf;
	struct rpc_task_setup task_setup_data = {
	struct rpc_task_setup task_setup_data = {
		.callback_ops = &rpc_default_ops,
		.callback_ops = &rpc_default_ops,
		.flags = RPC_TASK_SOFTCONN,
	};
	};


	dprintk("RPC: rpc_run_bc_task req= %p\n", req);
	dprintk("RPC: rpc_run_bc_task req= %p\n", req);
@@ -1964,10 +1965,15 @@ call_bc_transmit(struct rpc_task *task)
	switch (task->tk_status) {
	switch (task->tk_status) {
	case 0:
	case 0:
		/* Success */
		/* Success */
		break;
	case -EHOSTDOWN:
	case -EHOSTDOWN:
	case -EHOSTUNREACH:
	case -EHOSTUNREACH:
	case -ENETUNREACH:
	case -ENETUNREACH:
	case -ECONNRESET:
	case -ECONNREFUSED:
	case -EADDRINUSE:
	case -ENOTCONN:
	case -EPIPE:
		break;
	case -ETIMEDOUT:
	case -ETIMEDOUT:
		/*
		/*
		 * Problem reaching the server.  Disconnect and let the
		 * Problem reaching the server.  Disconnect and let the