summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-06-19 13:04:13 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-06-19 13:04:13 -0400
commit3832591e6fa53d8126d5e21446f225cda278d91a (patch)
treede6a531a277d6a4b37d5281a0a7447ac92930734 /net/sunrpc/clnt.c
parentdfad7000f32e3a6187e1ee36d52494d821553f2b (diff)
downloadop-kernel-dev-3832591e6fa53d8126d5e21446f225cda278d91a.zip
op-kernel-dev-3832591e6fa53d8126d5e21446f225cda278d91a.tar.gz
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: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index f41ed88..cbc6af9 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1031,6 +1031,7 @@ struct rpc_task *rpc_run_bc_task(struct rpc_rqst *req)
struct xdr_buf *xbufp = &req->rq_snd_buf;
struct rpc_task_setup task_setup_data = {
.callback_ops = &rpc_default_ops,
+ .flags = RPC_TASK_SOFTCONN,
};
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) {
case 0:
/* Success */
- break;
case -EHOSTDOWN:
case -EHOSTUNREACH:
case -ENETUNREACH:
+ case -ECONNRESET:
+ case -ECONNREFUSED:
+ case -EADDRINUSE:
+ case -ENOTCONN:
+ case -EPIPE:
+ break;
case -ETIMEDOUT:
/*
* Problem reaching the server. Disconnect and let the
OpenPOWER on IntegriCloud