linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sunrpc: when call_bind fails with -EACCES, don't exit with -EIO
@ 2011-07-07 14:32 Jeff Layton
  2011-07-07 14:35 ` Trond Myklebust
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2011-07-07 14:32 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: linux-nfs

Commit 0b760113a fixed the client not to loop indefinitely if the
rpcbind was continually failing. When this occurs though, the rpc_task
now exits with a status of -EIO. If the tk_status is -EACCES, it seems
like we should preserve that in this situation.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 net/sunrpc/clnt.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 8c91415..77f6c0c 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1175,8 +1175,10 @@ call_bind_status(struct rpc_task *task)
 			status = -EOPNOTSUPP;
 			break;
 		}
-		if (task->tk_rebind_retry == 0)
+		if (task->tk_rebind_retry == 0) {
+			status = task->tk_status;
 			break;
+		}
 		task->tk_rebind_retry--;
 		rpc_delay(task, 3*HZ);
 		goto retry_timeout;
-- 
1.7.6


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

* Re: [PATCH] sunrpc: when call_bind fails with -EACCES, don't exit with -EIO
  2011-07-07 14:32 [PATCH] sunrpc: when call_bind fails with -EACCES, don't exit with -EIO Jeff Layton
@ 2011-07-07 14:35 ` Trond Myklebust
  2011-07-07 14:49   ` Jeff Layton
  0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2011-07-07 14:35 UTC (permalink / raw)
  To: Jeff Layton; +Cc: linux-nfs

On Thu, 2011-07-07 at 10:32 -0400, Jeff Layton wrote: 
> Commit 0b760113a fixed the client not to loop indefinitely if the
> rpcbind was continually failing. When this occurs though, the rpc_task
> now exits with a status of -EIO. If the tk_status is -EACCES, it seems
> like we should preserve that in this situation.

Why? This isn't the POSIX EACCES error, but a sign that the server is
once again refusing to do business with us: usually that means EIO.

Cheers
  Trond

> Signed-off-by: Jeff Layton <jlayton@redhat.com>
> ---
>  net/sunrpc/clnt.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
> index 8c91415..77f6c0c 100644
> --- a/net/sunrpc/clnt.c
> +++ b/net/sunrpc/clnt.c
> @@ -1175,8 +1175,10 @@ call_bind_status(struct rpc_task *task)
>  			status = -EOPNOTSUPP;
>  			break;
>  		}
> -		if (task->tk_rebind_retry == 0)
> +		if (task->tk_rebind_retry == 0) {
> +			status = task->tk_status;
>  			break;
> +		}
>  		task->tk_rebind_retry--;
>  		rpc_delay(task, 3*HZ);
>  		goto retry_timeout;

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com


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

* Re: [PATCH] sunrpc: when call_bind fails with -EACCES, don't exit with -EIO
  2011-07-07 14:35 ` Trond Myklebust
@ 2011-07-07 14:49   ` Jeff Layton
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Layton @ 2011-07-07 14:49 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: linux-nfs

On Thu, 07 Jul 2011 10:35:56 -0400
Trond Myklebust <Trond.Myklebust@netapp.com> wrote:

> On Thu, 2011-07-07 at 10:32 -0400, Jeff Layton wrote: 
> > Commit 0b760113a fixed the client not to loop indefinitely if the
> > rpcbind was continually failing. When this occurs though, the rpc_task
> > now exits with a status of -EIO. If the tk_status is -EACCES, it seems
> > like we should preserve that in this situation.
> 
> Why? This isn't the POSIX EACCES error, but a sign that the server is
> once again refusing to do business with us: usually that means EIO.
> 

Fair enough. I figured that an EACCES error would better describe the
situation than EIO, but I'll defer to your judgement on this.

Cheers,
-- 
Jeff Layton <jlayton@redhat.com>

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

end of thread, other threads:[~2011-07-07 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-07 14:32 [PATCH] sunrpc: when call_bind fails with -EACCES, don't exit with -EIO Jeff Layton
2011-07-07 14:35 ` Trond Myklebust
2011-07-07 14:49   ` Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).