summaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2017-02-08 11:17:54 -0500
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2017-02-09 14:02:10 -0500
commit7196dbb02ea05835b9ee56910ee82cb55422c7f1 (patch)
treefc88f21e81df46ac054ee82f635bb1a822ef94bc /include/linux/sunrpc
parent8d1b8c62e0805af7df900ef121389778d2126997 (diff)
downloadop-kernel-dev-7196dbb02ea05835b9ee56910ee82cb55422c7f1.zip
op-kernel-dev-7196dbb02ea05835b9ee56910ee82cb55422c7f1.tar.gz
SUNRPC: Allow changing of the TCP timeout parameters on the fly
When the NFSv4 server tells us the lease period, we usually want to adjust down the timeout parameters on the TCP connection to ensure that we don't miss lease renewals due to a faulty connection. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/xprt.h4
-rw-r--r--include/linux/sunrpc/xprtsock.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index a5da60b..eab1c74 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -137,6 +137,9 @@ struct rpc_xprt_ops {
void (*release_request)(struct rpc_task *task);
void (*close)(struct rpc_xprt *xprt);
void (*destroy)(struct rpc_xprt *xprt);
+ void (*set_connect_timeout)(struct rpc_xprt *xprt,
+ unsigned long connect_timeout,
+ unsigned long reconnect_timeout);
void (*print_stats)(struct rpc_xprt *xprt, struct seq_file *seq);
int (*enable_swap)(struct rpc_xprt *xprt);
void (*disable_swap)(struct rpc_xprt *xprt);
@@ -221,6 +224,7 @@ struct rpc_xprt {
struct timer_list timer;
unsigned long last_used,
idle_timeout,
+ connect_timeout,
max_reconnect_timeout;
/*
diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrpc/xprtsock.h
index bef3fb0..c9959d7 100644
--- a/include/linux/sunrpc/xprtsock.h
+++ b/include/linux/sunrpc/xprtsock.h
@@ -55,6 +55,8 @@ struct sock_xprt {
size_t rcvsize,
sndsize;
+ struct rpc_timeout tcp_timeout;
+
/*
* Saved socket callback addresses
*/
@@ -81,6 +83,7 @@ struct sock_xprt {
#define XPRT_SOCK_CONNECTING 1U
#define XPRT_SOCK_DATA_READY (2)
+#define XPRT_SOCK_UPD_TIMEOUT (3)
#endif /* __KERNEL__ */
OpenPOWER on IntegriCloud