diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-09-11 18:00:47 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:16:56 -0400 |
commit | 906462af4c707ba0238f3579fdb2b594c4ea29c3 (patch) | |
tree | f3c15855aaef2353700f1bc91c56108c50ca4150 /net/sunrpc/clnt.c | |
parent | 2429cbf6a1566b8e92436d615387e4250feab46b (diff) |
SUNRPC: Split another new rpcbind retry error code from EACCES
Add more 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: retry with a lesser rpcbind version (rpcb now returns EPFNOSUPPORT)
This change allows more specific error processing for each of these two
cases. We now fail case 2 instead of retrying... it's a server
configuration error not to support even rpcbind version 2. And don't
expose this new error code to user land -- convert it to EIO before
failing the RPC.
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index e53d71827132..04f6e15457e0 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -940,7 +940,7 @@ call_bind(struct rpc_task *task) | |||
940 | static void | 940 | static void |
941 | call_bind_status(struct rpc_task *task) | 941 | call_bind_status(struct rpc_task *task) |
942 | { | 942 | { |
943 | int status = -EACCES; | 943 | int status = -EIO; |
944 | 944 | ||
945 | if (task->tk_status >= 0) { | 945 | if (task->tk_status >= 0) { |
946 | dprint_status(task); | 946 | dprint_status(task); |
@@ -966,6 +966,7 @@ call_bind_status(struct rpc_task *task) | |||
966 | task->tk_pid); | 966 | task->tk_pid); |
967 | goto retry_timeout; | 967 | goto retry_timeout; |
968 | case -EPFNOSUPPORT: | 968 | case -EPFNOSUPPORT: |
969 | /* server doesn't support any rpcbind version we know of */ | ||
969 | dprintk("RPC: %5u remote rpcbind service unavailable\n", | 970 | dprintk("RPC: %5u remote rpcbind service unavailable\n", |
970 | task->tk_pid); | 971 | task->tk_pid); |
971 | break; | 972 | break; |
@@ -978,7 +979,6 @@ call_bind_status(struct rpc_task *task) | |||
978 | default: | 979 | default: |
979 | dprintk("RPC: %5u unrecognized rpcbind error (%d)\n", | 980 | dprintk("RPC: %5u unrecognized rpcbind error (%d)\n", |
980 | task->tk_pid, -task->tk_status); | 981 | task->tk_pid, -task->tk_status); |
981 | status = -EIO; | ||
982 | } | 982 | } |
983 | 983 | ||
984 | rpc_exit(task, status); | 984 | rpc_exit(task, status); |