sunrpc: when call_bind fails with -EACCES, don't exit with -EIO
Subsystems (3)
PATCH 1/1 sunrpc: when call_bind fails with -EACCES, don't exit with -EIO
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.
--- net/sunrpc/clnt.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
net/sunrpc/clnt.c +3 -1
@@ -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;
Signature · 1 line
1.7.6
Quoted 4 lines · Jeff Layton
Commit
0b760113afixed the client not to loop indefinitely if the rpcbind was continually failing. When this occurs though, therpc_tasknow exits with a status of-EIO. If thetk_statusis-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
Quoted 21 lines
Signed-off-by Jeff Layton <[email protected]>--- net/sunrpc/clnt.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)net/sunrpc/clnt.c +3
-1@@ -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;
Signature · 6 lines
Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com
Quoted 9 lines · On Thu, 07 Jul 2011 10:35:56 -0400 Trond Myklebust…
Quoted 4 lines · Jeff Layton
Commit
0b760113afixed the client not to loop indefinitely if the rpcbind was continually failing. When this occurs though, therpc_tasknow exits with a status of-EIO. If thetk_statusis-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,
Signature · 1 line
Jeff Layton <[email protected]>