diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-08-04 00:08:45 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-08-05 14:12:09 -0400 |
commit | 3851f1cdb2b8d507b10395fc110d4c37d6121285 (patch) | |
tree | 295be3dd6dcc3874c34a6b6a86fbdb76dbfa98de /net/sunrpc/clnt.c | |
parent | 02910177aede34d6f49e2dc14b1c5c6cd468d94f (diff) | |
download | linux-3851f1cdb2b8d507b10395fc110d4c37d6121285.tar.gz linux-3851f1cdb2b8d507b10395fc110d4c37d6121285.tar.bz2 linux-3851f1cdb2b8d507b10395fc110d4c37d6121285.zip |
SUNRPC: Limit the reconnect backoff timer to the max RPC message timeout
...and ensure that we propagate it to new transports on the same
client.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index cb49898a5a58..faac5472d14d 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -2638,6 +2638,7 @@ int rpc_clnt_add_xprt(struct rpc_clnt *clnt, { struct rpc_xprt_switch *xps; struct rpc_xprt *xprt; + unsigned long reconnect_timeout; unsigned char resvport; int ret = 0; @@ -2649,6 +2650,7 @@ int rpc_clnt_add_xprt(struct rpc_clnt *clnt, return -EAGAIN; } resvport = xprt->resvport; + reconnect_timeout = xprt->max_reconnect_timeout; rcu_read_unlock(); xprt = xprt_create_transport(xprtargs); @@ -2657,6 +2659,7 @@ int rpc_clnt_add_xprt(struct rpc_clnt *clnt, goto out_put_switch; } xprt->resvport = resvport; + xprt->max_reconnect_timeout = reconnect_timeout; rpc_xprt_switch_set_roundrobin(xps); if (setup) { |