All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] NFSv4: Schedule recovery if nfs40_walk_client_list() is interrupted
@ 2014-03-18 20:03 Trond Myklebust
  2014-03-18 20:03 ` [PATCH 2/2] NFSv4: Ensure we respect soft mount timeouts during trunking discovery Trond Myklebust
  2014-03-19 12:09 ` [PATCH 1/2] NFSv4: Schedule recovery if nfs40_walk_client_list() is interrupted Steve Dickson
  0 siblings, 2 replies; 4+ messages in thread
From: Trond Myklebust @ 2014-03-18 20:03 UTC (permalink / raw)
  To: steved; +Cc: linux-nfs

If a timeout or a signal interrupts the NFSv4 trunking discovery
SETCLIENTID_CONFIRM call, then we don't know whether or not the
server has changed the callback identifier on us.
Assume that it did, and schedule a 'path down' recovery...

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
 fs/nfs/nfs4client.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index 0e46d3d1b6cc..aa9ef4876046 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -531,6 +531,13 @@ int nfs40_walk_client_list(struct nfs_client *new,
 			*result = pos;
 			dprintk("NFS: <-- %s using nfs_client = %p ({%d})\n",
 				__func__, pos, atomic_read(&pos->cl_count));
+			goto out;
+		case -ERESTARTSYS:
+		case -ETIMEDOUT:
+			/* The callback path may have been inadvertently
+			 * changed. Schedule recovery!
+			 */
+			nfs4_schedule_path_down_recovery(pos);
 		default:
 			goto out;
 		}
-- 
1.8.5.3


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

* [PATCH 2/2] NFSv4: Ensure we respect soft mount timeouts during trunking discovery
  2014-03-18 20:03 [PATCH 1/2] NFSv4: Schedule recovery if nfs40_walk_client_list() is interrupted Trond Myklebust
@ 2014-03-18 20:03 ` Trond Myklebust
  2014-03-19 12:10   ` Steve Dickson
  2014-03-19 12:09 ` [PATCH 1/2] NFSv4: Schedule recovery if nfs40_walk_client_list() is interrupted Steve Dickson
  1 sibling, 1 reply; 4+ messages in thread
From: Trond Myklebust @ 2014-03-18 20:03 UTC (permalink / raw)
  To: steved; +Cc: linux-nfs

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
 fs/nfs/nfs4state.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index f544a1560c83..2349518eef2c 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2075,8 +2075,10 @@ again:
 	switch (status) {
 	case 0:
 		break;
-	case -NFS4ERR_DELAY:
 	case -ETIMEDOUT:
+		if (clnt->cl_softrtry)
+			break;
+	case -NFS4ERR_DELAY:
 	case -EAGAIN:
 		ssleep(1);
 	case -NFS4ERR_STALE_CLIENTID:
-- 
1.8.5.3


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

* Re: [PATCH 1/2] NFSv4: Schedule recovery if nfs40_walk_client_list() is interrupted
  2014-03-18 20:03 [PATCH 1/2] NFSv4: Schedule recovery if nfs40_walk_client_list() is interrupted Trond Myklebust
  2014-03-18 20:03 ` [PATCH 2/2] NFSv4: Ensure we respect soft mount timeouts during trunking discovery Trond Myklebust
@ 2014-03-19 12:09 ` Steve Dickson
  1 sibling, 0 replies; 4+ messages in thread
From: Steve Dickson @ 2014-03-19 12:09 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: linux-nfs



On 03/18/2014 04:03 PM, Trond Myklebust wrote:
> If a timeout or a signal interrupts the NFSv4 trunking discovery
> SETCLIENTID_CONFIRM call, then we don't know whether or not the
> server has changed the callback identifier on us.
> Assume that it did, and schedule a 'path down' recovery...
> 
> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Tested-by: Steve Dickson <steved@redhat.com>

steved.
> ---
>  fs/nfs/nfs4client.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
> index 0e46d3d1b6cc..aa9ef4876046 100644
> --- a/fs/nfs/nfs4client.c
> +++ b/fs/nfs/nfs4client.c
> @@ -531,6 +531,13 @@ int nfs40_walk_client_list(struct nfs_client *new,
>  			*result = pos;
>  			dprintk("NFS: <-- %s using nfs_client = %p ({%d})\n",
>  				__func__, pos, atomic_read(&pos->cl_count));
> +			goto out;
> +		case -ERESTARTSYS:
> +		case -ETIMEDOUT:
> +			/* The callback path may have been inadvertently
> +			 * changed. Schedule recovery!
> +			 */
> +			nfs4_schedule_path_down_recovery(pos);
>  		default:
>  			goto out;
>  		}
> 

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

* Re: [PATCH 2/2] NFSv4: Ensure we respect soft mount timeouts during trunking discovery
  2014-03-18 20:03 ` [PATCH 2/2] NFSv4: Ensure we respect soft mount timeouts during trunking discovery Trond Myklebust
@ 2014-03-19 12:10   ` Steve Dickson
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Dickson @ 2014-03-19 12:10 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: linux-nfs



On 03/18/2014 04:03 PM, Trond Myklebust wrote:
> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Tested-by: Steve Dickson <steved@redhat.com>

steved.
> ---
>  fs/nfs/nfs4state.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
> index f544a1560c83..2349518eef2c 100644
> --- a/fs/nfs/nfs4state.c
> +++ b/fs/nfs/nfs4state.c
> @@ -2075,8 +2075,10 @@ again:
>  	switch (status) {
>  	case 0:
>  		break;
> -	case -NFS4ERR_DELAY:
>  	case -ETIMEDOUT:
> +		if (clnt->cl_softrtry)
> +			break;
> +	case -NFS4ERR_DELAY:
>  	case -EAGAIN:
>  		ssleep(1);
>  	case -NFS4ERR_STALE_CLIENTID:
> 

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

end of thread, other threads:[~2014-03-19 12:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-18 20:03 [PATCH 1/2] NFSv4: Schedule recovery if nfs40_walk_client_list() is interrupted Trond Myklebust
2014-03-18 20:03 ` [PATCH 2/2] NFSv4: Ensure we respect soft mount timeouts during trunking discovery Trond Myklebust
2014-03-19 12:10   ` Steve Dickson
2014-03-19 12:09 ` [PATCH 1/2] NFSv4: Schedule recovery if nfs40_walk_client_list() is interrupted Steve Dickson

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.