All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Client reconnection fixes
@ 2016-08-05 23:37 Trond Myklebust
  2016-08-05 23:37 ` [PATCH v2 1/3] SUNRPC: Limit the reconnect backoff timer to the max RPC message timeout Trond Myklebust
  2016-08-08 14:26 ` [PATCH v2 0/3] Client reconnection fixes Anna Schumaker
  0 siblings, 2 replies; 9+ messages in thread
From: Trond Myklebust @ 2016-08-05 23:37 UTC (permalink / raw)
  To: linux-nfs

v1: Cap the backoff timer to the max RPC message timeout
v2: Add a cap at 1/2 NFSv4 lease period to ensure we don't miss lease renewal

Trond Myklebust (3):
  SUNRPC: Limit the reconnect backoff timer to the max RPC message
    timeout
  NFSv4: Cleanup the setting of the nfs4 lease period
  NFSv4: Cap the transport reconnection timer at 1/2 lease period

 fs/nfs/nfs4_fs.h            |  4 ++++
 fs/nfs/nfs4proc.c           |  9 +++------
 fs/nfs/nfs4renewd.c         | 20 ++++++++++++++++++++
 fs/nfs/nfs4state.c          |  9 +++------
 include/linux/sunrpc/clnt.h |  2 ++
 include/linux/sunrpc/xprt.h |  3 ++-
 net/sunrpc/clnt.c           | 24 ++++++++++++++++++++++++
 net/sunrpc/xprtsock.c       | 18 ++++++++++++------
 8 files changed, 70 insertions(+), 19 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/3] SUNRPC: Limit the reconnect backoff timer to the max RPC message timeout
  2016-08-05 23:37 [PATCH v2 0/3] Client reconnection fixes Trond Myklebust
@ 2016-08-05 23:37 ` Trond Myklebust
  2016-08-05 23:37   ` [PATCH v2 2/3] NFSv4: Cleanup the setting of the nfs4 lease period Trond Myklebust
  2016-08-08 14:26 ` [PATCH v2 0/3] Client reconnection fixes Anna Schumaker
  1 sibling, 1 reply; 9+ messages in thread
From: Trond Myklebust @ 2016-08-05 23:37 UTC (permalink / raw)
  To: linux-nfs

...and ensure that we propagate it to new transports on the same
client.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
 include/linux/sunrpc/xprt.h |  3 ++-
 net/sunrpc/clnt.c           |  3 +++
 net/sunrpc/xprtsock.c       | 18 ++++++++++++------
 3 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index 5e3e1b63dbb3..a16070dd03ee 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -218,7 +218,8 @@ struct rpc_xprt {
 	struct work_struct	task_cleanup;
 	struct timer_list	timer;
 	unsigned long		last_used,
-				idle_timeout;
+				idle_timeout,
+				max_reconnect_timeout;
 
 	/*
 	 * Send stuff
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) {
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 04b0c4190dd7..8ede3bc52481 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -177,7 +177,6 @@ static struct ctl_table sunrpc_table[] = {
  * increase over time if the server is down or not responding.
  */
 #define XS_TCP_INIT_REEST_TO	(3U * HZ)
-#define XS_TCP_MAX_REEST_TO	(5U * 60 * HZ)
 
 /*
  * TCP idle timeout; client drops the transport socket if it is idle
@@ -2396,6 +2395,15 @@ static unsigned long xs_reconnect_delay(const struct rpc_xprt *xprt)
 	return 0;
 }
 
+static void xs_reconnect_backoff(struct rpc_xprt *xprt)
+{
+	xprt->reestablish_timeout <<= 1;
+	if (xprt->reestablish_timeout > xprt->max_reconnect_timeout)
+		xprt->reestablish_timeout = xprt->max_reconnect_timeout;
+	if (xprt->reestablish_timeout < XS_TCP_INIT_REEST_TO)
+		xprt->reestablish_timeout = XS_TCP_INIT_REEST_TO;
+}
+
 /**
  * xs_connect - connect a socket to a remote endpoint
  * @xprt: pointer to transport structure
@@ -2426,12 +2434,8 @@ static void xs_connect(struct rpc_xprt *xprt, struct rpc_task *task)
 		xs_reset_transport(transport);
 
 		delay = xs_reconnect_delay(xprt);
+		xs_reconnect_backoff(xprt);
 
-		xprt->reestablish_timeout <<= 1;
-		if (xprt->reestablish_timeout < XS_TCP_INIT_REEST_TO)
-			xprt->reestablish_timeout = XS_TCP_INIT_REEST_TO;
-		if (xprt->reestablish_timeout > XS_TCP_MAX_REEST_TO)
-			xprt->reestablish_timeout = XS_TCP_MAX_REEST_TO;
 	} else
 		dprintk("RPC:       xs_connect scheduled xprt %p\n", xprt);
 
@@ -2989,6 +2993,8 @@ static struct rpc_xprt *xs_setup_tcp(struct xprt_create *args)
 	xprt->ops = &xs_tcp_ops;
 	xprt->timeout = &xs_tcp_default_timeout;
 
+	xprt->max_reconnect_timeout = xprt->timeout->to_maxval;
+
 	INIT_WORK(&transport->recv_worker, xs_tcp_data_receive_workfn);
 	INIT_DELAYED_WORK(&transport->connect_worker, xs_tcp_setup_socket);
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 2/3] NFSv4: Cleanup the setting of the nfs4 lease period
  2016-08-05 23:37 ` [PATCH v2 1/3] SUNRPC: Limit the reconnect backoff timer to the max RPC message timeout Trond Myklebust
@ 2016-08-05 23:37   ` Trond Myklebust
  2016-08-05 23:37     ` [PATCH v2 3/3] NFSv4: Cap the transport reconnection timer at 1/2 " Trond Myklebust
  0 siblings, 1 reply; 9+ messages in thread
From: Trond Myklebust @ 2016-08-05 23:37 UTC (permalink / raw)
  To: linux-nfs

Make a helper function nfs4_set_lease_period() and have
nfs41_setup_state_renewal() and nfs4_do_fsinfo() use it.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
 fs/nfs/nfs4_fs.h    |  4 ++++
 fs/nfs/nfs4proc.c   |  9 +++------
 fs/nfs/nfs4renewd.c | 17 +++++++++++++++++
 fs/nfs/nfs4state.c  |  9 +++------
 4 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index 4be567a54958..74a0e34e5ded 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -395,6 +395,10 @@ extern void nfs4_schedule_state_renewal(struct nfs_client *);
 extern void nfs4_renewd_prepare_shutdown(struct nfs_server *);
 extern void nfs4_kill_renewd(struct nfs_client *);
 extern void nfs4_renew_state(struct work_struct *);
+extern void nfs4_set_lease_period(struct nfs_client *clp,
+		unsigned long lease,
+		unsigned long lastrenewed);
+
 
 /* nfs4state.c */
 struct rpc_cred *nfs4_get_clid_cred(struct nfs_client *clp);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index da5c9e58e907..b9e18679af50 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4237,12 +4237,9 @@ static int nfs4_do_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, str
 		err = _nfs4_do_fsinfo(server, fhandle, fsinfo);
 		trace_nfs4_fsinfo(server, fhandle, fsinfo->fattr, err);
 		if (err == 0) {
-			struct nfs_client *clp = server->nfs_client;
-
-			spin_lock(&clp->cl_lock);
-			clp->cl_lease_time = fsinfo->lease_time * HZ;
-			clp->cl_last_renewal = now;
-			spin_unlock(&clp->cl_lock);
+			nfs4_set_lease_period(server->nfs_client,
+					fsinfo->lease_time * HZ,
+					now);
 			break;
 		}
 		err = nfs4_handle_exception(server, err, &exception);
diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c
index e1ba58c3d1ad..062029ab344a 100644
--- a/fs/nfs/nfs4renewd.c
+++ b/fs/nfs/nfs4renewd.c
@@ -136,6 +136,23 @@ nfs4_kill_renewd(struct nfs_client *clp)
 	cancel_delayed_work_sync(&clp->cl_renewd);
 }
 
+/**
+ * nfs4_set_lease_period - Sets the lease period on a nfs_client
+ *
+ * @clp: pointer to nfs_client
+ * @lease: new value for lease period
+ * @lastrenewed: time at which lease was last renewed
+ */
+void nfs4_set_lease_period(struct nfs_client *clp,
+		unsigned long lease,
+		unsigned long lastrenewed)
+{
+	spin_lock(&clp->cl_lock);
+	clp->cl_lease_time = lease;
+	clp->cl_last_renewal = lastrenewed;
+	spin_unlock(&clp->cl_lock);
+}
+
 /*
  * Local variables:
  *   c-basic-offset: 8
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 834b875900d6..cada00aa5096 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -277,20 +277,17 @@ static int nfs41_setup_state_renewal(struct nfs_client *clp)
 {
 	int status;
 	struct nfs_fsinfo fsinfo;
+	unsigned long now;
 
 	if (!test_bit(NFS_CS_CHECK_LEASE_TIME, &clp->cl_res_state)) {
 		nfs4_schedule_state_renewal(clp);
 		return 0;
 	}
 
+	now = jiffies;
 	status = nfs4_proc_get_lease_time(clp, &fsinfo);
 	if (status == 0) {
-		/* Update lease time and schedule renewal */
-		spin_lock(&clp->cl_lock);
-		clp->cl_lease_time = fsinfo.lease_time * HZ;
-		clp->cl_last_renewal = jiffies;
-		spin_unlock(&clp->cl_lock);
-
+		nfs4_set_lease_period(clp, fsinfo.lease_time * HZ, now);
 		nfs4_schedule_state_renewal(clp);
 	}
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 3/3] NFSv4: Cap the transport reconnection timer at 1/2 lease period
  2016-08-05 23:37   ` [PATCH v2 2/3] NFSv4: Cleanup the setting of the nfs4 lease period Trond Myklebust
@ 2016-08-05 23:37     ` Trond Myklebust
  0 siblings, 0 replies; 9+ messages in thread
From: Trond Myklebust @ 2016-08-05 23:37 UTC (permalink / raw)
  To: linux-nfs

We don't want to miss a lease period renewal due to the TCP connection
failing to reconnect in a timely fashion. To ensure this doesn't happen,
cap the reconnection timer so that we retry the connection attempt
at least every 1/2 lease period.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
 fs/nfs/nfs4renewd.c         |  3 +++
 include/linux/sunrpc/clnt.h |  2 ++
 net/sunrpc/clnt.c           | 21 +++++++++++++++++++++
 3 files changed, 26 insertions(+)

diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c
index 062029ab344a..82e77198d17e 100644
--- a/fs/nfs/nfs4renewd.c
+++ b/fs/nfs/nfs4renewd.c
@@ -151,6 +151,9 @@ void nfs4_set_lease_period(struct nfs_client *clp,
 	clp->cl_lease_time = lease;
 	clp->cl_last_renewal = lastrenewed;
 	spin_unlock(&clp->cl_lock);
+
+	/* Cap maximum reconnect timeout at 1/2 lease period */
+	rpc_cap_max_reconnect_timeout(clp->cl_rpcclient, lease >> 1);
 }
 
 /*
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index b6810c92b8bb..5c02b0691587 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -195,6 +195,8 @@ int		rpc_clnt_add_xprt(struct rpc_clnt *, struct xprt_create *,
 				struct rpc_xprt *,
 				void *),
 			void *data);
+void		rpc_cap_max_reconnect_timeout(struct rpc_clnt *clnt,
+			unsigned long timeo);
 
 const char *rpc_proc_name(const struct rpc_task *task);
 #endif /* __KERNEL__ */
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index faac5472d14d..7f79fb7dc6a0 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -2676,6 +2676,27 @@ out_put_switch:
 }
 EXPORT_SYMBOL_GPL(rpc_clnt_add_xprt);
 
+static int
+rpc_xprt_cap_max_reconnect_timeout(struct rpc_clnt *clnt,
+		struct rpc_xprt *xprt,
+		void *data)
+{
+	unsigned long timeout = *((unsigned long *)data);
+
+	if (timeout < xprt->max_reconnect_timeout)
+		xprt->max_reconnect_timeout = timeout;
+	return 0;
+}
+
+void
+rpc_cap_max_reconnect_timeout(struct rpc_clnt *clnt, unsigned long timeo)
+{
+	rpc_clnt_iterate_for_each_xprt(clnt,
+			rpc_xprt_cap_max_reconnect_timeout,
+			&timeo);
+}
+EXPORT_SYMBOL_GPL(rpc_cap_max_reconnect_timeout);
+
 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
 static void rpc_show_header(void)
 {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/3] Client reconnection fixes
  2016-08-05 23:37 [PATCH v2 0/3] Client reconnection fixes Trond Myklebust
  2016-08-05 23:37 ` [PATCH v2 1/3] SUNRPC: Limit the reconnect backoff timer to the max RPC message timeout Trond Myklebust
@ 2016-08-08 14:26 ` Anna Schumaker
  2016-08-08 14:58   ` Trond Myklebust
  1 sibling, 1 reply; 9+ messages in thread
From: Anna Schumaker @ 2016-08-08 14:26 UTC (permalink / raw)
  To: Trond Myklebust, linux-nfs

Hi Trond,

Do these patches depend on another patch set?  I tried applying the first patch, but my git tree is missing sha1 information for net/sunrpc/xprtsock.c.

Thanks,
Anna

On 08/05/2016 07:37 PM, Trond Myklebust wrote:
> v1: Cap the backoff timer to the max RPC message timeout
> v2: Add a cap at 1/2 NFSv4 lease period to ensure we don't miss lease renewal
>
> Trond Myklebust (3):
>   SUNRPC: Limit the reconnect backoff timer to the max RPC message
>     timeout
>   NFSv4: Cleanup the setting of the nfs4 lease period
>   NFSv4: Cap the transport reconnection timer at 1/2 lease period
>
>  fs/nfs/nfs4_fs.h            |  4 ++++
>  fs/nfs/nfs4proc.c           |  9 +++------
>  fs/nfs/nfs4renewd.c         | 20 ++++++++++++++++++++
>  fs/nfs/nfs4state.c          |  9 +++------
>  include/linux/sunrpc/clnt.h |  2 ++
>  include/linux/sunrpc/xprt.h |  3 ++-
>  net/sunrpc/clnt.c           | 24 ++++++++++++++++++++++++
>  net/sunrpc/xprtsock.c       | 18 ++++++++++++------
>  8 files changed, 70 insertions(+), 19 deletions(-)
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/3] Client reconnection fixes
  2016-08-08 14:26 ` [PATCH v2 0/3] Client reconnection fixes Anna Schumaker
@ 2016-08-08 14:58   ` Trond Myklebust
  2016-08-08 15:06     ` Anna Schumaker
  0 siblings, 1 reply; 9+ messages in thread
From: Trond Myklebust @ 2016-08-08 14:58 UTC (permalink / raw)
  To: Schumaker Anna; +Cc: List Linux NFS Mailing

VGhlcmUgYXJlIG5vIHBhcnRpY3VsYXIgZGVwZW5kZW5jaWVzIGJleW9uZCA0LjgtcmMxIHRoYXQg
SeKAmW0gYXdhcmUgb2YuIEkgaGF2ZSBhcHBsaWVkIHRoZW0gdG8gbXkgbGludXgtbmV4dCBicmFu
Y2g6DQoNCiBodHRwOi8vZ2l0LmxpbnV4LW5mcy5vcmcvP3A9dHJvbmRteS9saW51eC1uZnMuZ2l0
O2E9c2hvcnRsb2c7aD1yZWZzL2hlYWRzL2xpbnV4LW5leHQNCg0KDQo+IE9uIEF1ZyA4LCAyMDE2
LCBhdCAxMDoyNiwgQW5uYSBTY2h1bWFrZXIgPEFubmEuU2NodW1ha2VyQG5ldGFwcC5jb20+IHdy
b3RlOg0KPiANCj4gSGkgVHJvbmQsDQo+IA0KPiBEbyB0aGVzZSBwYXRjaGVzIGRlcGVuZCBvbiBh
bm90aG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xp
bnV4L3N1bnJwYy9jbG50LmggfCAgMiArKw0KPj4gaW5jbHVkZS9saW51eC9zdW5ycGMveHBydC5o
IHwgIDMgKystDQo+PiBuZXQvc3VucnBjL2NsbnQuYyAgICAgICAgICAgfCAyNCArKysrKysrKysr
KysrKysrKysrKysrKysNCj4+IG5ldC9zdW5ycGMveHBydHNvY2suYyAgICAgICB8IDE4ICsrKysr
KysrKysrKy0tLS0tLQ0KPj4gOCBmaWxlcyBjaGFuZ2VkLCA3MCBpbnNlcnRpb25zKCspLCAxOSBk
ZWxldGlvbnMoLSkNCj4+IA0KPiANCg0K


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/3] Client reconnection fixes
  2016-08-08 14:58   ` Trond Myklebust
@ 2016-08-08 15:06     ` Anna Schumaker
  2016-08-08 15:10       ` Trond Myklebust
  0 siblings, 1 reply; 9+ messages in thread
From: Anna Schumaker @ 2016-08-08 15:06 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: List Linux NFS Mailing

Applying these three directly on 4.8-rc1 gave me problems.  Looks like I'm missing xs_reconnect_delay() in my git tree which was added by "SUNRPC: Fix reconnection timeouts" in v1 of your patches (but missing in this series).

Anna

On 08/08/2016 10:58 AM, Trond Myklebust wrote:
> There are no particular dependencies beyond 4.8-rc1 that I’m aware of. I have applied them to my linux-next branch:
> 
>  http://git.linux-nfs.org/?p=trondmy/linux-nfs.git;a=shortlog;h=refs/heads/linux-next
> 
> 
>> On Aug 8, 2016, at 10:26, Anna Schumaker <Anna.Schumaker@netapp.com> wrote:
>>
>> Hi Trond,
>>
>> Do these patches depend on another patch set?  I tried applying the first patch, but my git tree is missing sha1 information for net/sunrpc/xprtsock.c.
>>
>> Thanks,
>> Anna
>>
>> On 08/05/2016 07:37 PM, Trond Myklebust wrote:
>>> v1: Cap the backoff timer to the max RPC message timeout
>>> v2: Add a cap at 1/2 NFSv4 lease period to ensure we don't miss lease renewal
>>>
>>> Trond Myklebust (3):
>>>  SUNRPC: Limit the reconnect backoff timer to the max RPC message
>>>    timeout
>>>  NFSv4: Cleanup the setting of the nfs4 lease period
>>>  NFSv4: Cap the transport reconnection timer at 1/2 lease period
>>>
>>> fs/nfs/nfs4_fs.h            |  4 ++++
>>> fs/nfs/nfs4proc.c           |  9 +++------
>>> fs/nfs/nfs4renewd.c         | 20 ++++++++++++++++++++
>>> fs/nfs/nfs4state.c          |  9 +++------
>>> include/linux/sunrpc/clnt.h |  2 ++
>>> include/linux/sunrpc/xprt.h |  3 ++-
>>> net/sunrpc/clnt.c           | 24 ++++++++++++++++++++++++
>>> net/sunrpc/xprtsock.c       | 18 ++++++++++++------
>>> 8 files changed, 70 insertions(+), 19 deletions(-)
>>>
>>
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/3] Client reconnection fixes
  2016-08-08 15:06     ` Anna Schumaker
@ 2016-08-08 15:10       ` Trond Myklebust
  2016-08-08 15:16         ` Anna Schumaker
  0 siblings, 1 reply; 9+ messages in thread
From: Trond Myklebust @ 2016-08-08 15:10 UTC (permalink / raw)
  To: Schumaker Anna; +Cc: List Linux NFS Mailing

U29ycnksIHllcyB0aGVyZSBpcyBhIGRlcGVuZGVuY3kgdGhlcmUuDQoNCj4gT24gQXVnIDgsIDIw
MTYsIGF0IDExOjA2LCBBbm5hIFNjaHVtYWtlciA8QW5uYS5TY2h1bWFrZXJAbmV0YXBwLmNvbT4g
d3JvdGU6DQo+IA0KPiBBcHBseWluZyB0aGVzZSB0aHJlZSBkaXJlY3RseSBvbiA0LjgtcmMxIGdh
dmUgbWUgcHJvYmxlbXMuICBMb29rcyBsaWtlIEknbSBtaXNzaW5nIHhzX3JlY29ubmVjdF9kZWxh
eSgpIGluIG15IGdpdCB0cmVlIHdoaWNoIHdhcyBhZGRlZCBieSAiU1VOUlBDOiBGaXggcmVjb25u
ZWN0aW9uIHRpbWVvdXRzIiBpbiB2MSBvZiB5b3VyIHBhdGNoZXMgKGJ1dCBtaXNzaW5nIGluIH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+ messages in thread

* Re: [PATCH v2 0/3] Client reconnection fixes
  2016-08-08 15:10       ` Trond Myklebust
@ 2016-08-08 15:16         ` Anna Schumaker
  0 siblings, 0 replies; 9+ messages in thread
From: Anna Schumaker @ 2016-08-08 15:16 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: List Linux NFS Mailing

Ah, I saw v2 in the subject and assumed these patches replaced both of them.  I'll add that patch, and then this series on top!

Thanks for helping clear up my confusion!
Anna

On 08/08/2016 11:10 AM, Trond Myklebust wrote:
> Sorry, yes there is a dependency there.
> 
>> On Aug 8, 2016, at 11:06, Anna Schumaker <Anna.Schumaker@netapp.com> wrote:
>>
>> Applying these three directly on 4.8-rc1 gave me problems.  Looks like I'm missing xs_reconnect_delay() in my git tree which was added by "SUNRPC: Fix reconnection timeouts" in v1 of your patches (but missing in this series).
>>
>> Anna
>>
>> On 08/08/2016 10:58 AM, Trond Myklebust wrote:
>>> There are no particular dependencies beyond 4.8-rc1 that I’m aware of. I have applied them to my linux-next branch:
>>>
>>> http://git.linux-nfs.org/?p=trondmy/linux-nfs.git;a=shortlog;h=refs/heads/linux-next
>>>
>>>
>>>> On Aug 8, 2016, at 10:26, Anna Schumaker <Anna.Schumaker@netapp.com> wrote:
>>>>
>>>> Hi Trond,
>>>>
>>>> Do these patches depend on another patch set?  I tried applying the first patch, but my git tree is missing sha1 information for net/sunrpc/xprtsock.c.
>>>>
>>>> Thanks,
>>>> Anna
>>>>
>>>> On 08/05/2016 07:37 PM, Trond Myklebust wrote:
>>>>> v1: Cap the backoff timer to the max RPC message timeout
>>>>> v2: Add a cap at 1/2 NFSv4 lease period to ensure we don't miss lease renewal
>>>>>
>>>>> Trond Myklebust (3):
>>>>> SUNRPC: Limit the reconnect backoff timer to the max RPC message
>>>>>   timeout
>>>>> NFSv4: Cleanup the setting of the nfs4 lease period
>>>>> NFSv4: Cap the transport reconnection timer at 1/2 lease period
>>>>>
>>>>> fs/nfs/nfs4_fs.h            |  4 ++++
>>>>> fs/nfs/nfs4proc.c           |  9 +++------
>>>>> fs/nfs/nfs4renewd.c         | 20 ++++++++++++++++++++
>>>>> fs/nfs/nfs4state.c          |  9 +++------
>>>>> include/linux/sunrpc/clnt.h |  2 ++
>>>>> include/linux/sunrpc/xprt.h |  3 ++-
>>>>> net/sunrpc/clnt.c           | 24 ++++++++++++++++++++++++
>>>>> net/sunrpc/xprtsock.c       | 18 ++++++++++++------
>>>>> 8 files changed, 70 insertions(+), 19 deletions(-)
>>>>>
>>>>
>>>
>>
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-08-08 15:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-05 23:37 [PATCH v2 0/3] Client reconnection fixes Trond Myklebust
2016-08-05 23:37 ` [PATCH v2 1/3] SUNRPC: Limit the reconnect backoff timer to the max RPC message timeout Trond Myklebust
2016-08-05 23:37   ` [PATCH v2 2/3] NFSv4: Cleanup the setting of the nfs4 lease period Trond Myklebust
2016-08-05 23:37     ` [PATCH v2 3/3] NFSv4: Cap the transport reconnection timer at 1/2 " Trond Myklebust
2016-08-08 14:26 ` [PATCH v2 0/3] Client reconnection fixes Anna Schumaker
2016-08-08 14:58   ` Trond Myklebust
2016-08-08 15:06     ` Anna Schumaker
2016-08-08 15:10       ` Trond Myklebust
2016-08-08 15:16         ` Anna Schumaker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.