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>
This commit is contained in:

committed by
Anna Schumaker

parent
8d1b8c62e0
commit
7196dbb02e
@@ -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;
|
||||
|
||||
/*
|
||||
|
@@ -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__ */
|
||||
|
||||
|
Reference in New Issue
Block a user