diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-09-11 18:00:52 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:16:58 -0400 |
commit | b79dc8ced1412e7056f3969bef40a30cc75ee530 (patch) | |
tree | 2a21fd59b9c4a38e7d3effad185db40ae60ceb3b /net/sunrpc | |
parent | 906462af4c707ba0238f3579fdb2b594c4ea29c3 (diff) |
SUNRPC: RPC bind failures should be permanent for NULL requests
The purpose of an RPC ping (a NULL request) is to determine whether the
remote end is operating and supports the RPC program and version of the
request.
If we do an RPC bind and the remote's rpcbind service says "this
program or service isn't supported" then we have our answer already,
and we should give up immediately.
This is good for the kernel mount client, as it will cause the request
to fail, and then allow an immediate retry with different options.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/clnt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 04f6e15457e0..b19bacf42564 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -959,6 +959,11 @@ call_bind_status(struct rpc_task *task) | |||
959 | case -EACCES: | 959 | case -EACCES: |
960 | dprintk("RPC: %5u remote rpcbind: RPC program/version " | 960 | dprintk("RPC: %5u remote rpcbind: RPC program/version " |
961 | "unavailable\n", task->tk_pid); | 961 | "unavailable\n", task->tk_pid); |
962 | /* fail immediately if this is an RPC ping */ | ||
963 | if (task->tk_msg.rpc_proc->p_proc == 0) { | ||
964 | status = -EOPNOTSUPP; | ||
965 | break; | ||
966 | } | ||
962 | rpc_delay(task, 3*HZ); | 967 | rpc_delay(task, 3*HZ); |
963 | goto retry_timeout; | 968 | goto retry_timeout; |
964 | case -ETIMEDOUT: | 969 | case -ETIMEDOUT: |