diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-09-11 18:00:41 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:16:53 -0400 |
commit | 2429cbf6a1566b8e92436d615387e4250feab46b (patch) | |
tree | e3d4906948d68a3d9bcb546b6eb6563f1cffaa60 /net/sunrpc/clnt.c | |
parent | 4784cb51a3f66d401f8a08810231aa7dc8f44e43 (diff) |
SUNRPC: Add a new error code for retry waiting for another binder
Add new error code processing to the kernel's rpcbind client and to
call_bind_status() to distinguish two cases:
Case 1: the remote has replied that the program/version tuple is not
registered (returns -EACCES)
Case 2: another process is already in the middle of binding on this
transport (now returns -EAGAIN)
This change allows more specific retry processing for each of these two
cases.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 7a7cd3b7acce..e53d71827132 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -950,6 +950,12 @@ call_bind_status(struct rpc_task *task) | |||
950 | } | 950 | } |
951 | 951 | ||
952 | switch (task->tk_status) { | 952 | switch (task->tk_status) { |
953 | case -EAGAIN: | ||
954 | dprintk("RPC: %5u rpcbind waiting for another request " | ||
955 | "to finish\n", task->tk_pid); | ||
956 | /* avoid busy-waiting here -- could be a network outage. */ | ||
957 | rpc_delay(task, 5*HZ); | ||
958 | goto retry_timeout; | ||
953 | case -EACCES: | 959 | case -EACCES: |
954 | dprintk("RPC: %5u remote rpcbind: RPC program/version " | 960 | dprintk("RPC: %5u remote rpcbind: RPC program/version " |
955 | "unavailable\n", task->tk_pid); | 961 | "unavailable\n", task->tk_pid); |