Skip to content

Commit

Permalink
SUNRPC: RPC bind failures should be permanent for NULL requests
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Oct 9, 2007
1 parent 906462a commit b79dc8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,11 @@ call_bind_status(struct rpc_task *task)
case -EACCES:
dprintk("RPC: %5u remote rpcbind: RPC program/version "
"unavailable\n", task->tk_pid);
/* fail immediately if this is an RPC ping */
if (task->tk_msg.rpc_proc->p_proc == 0) {
status = -EOPNOTSUPP;
break;
}
rpc_delay(task, 3*HZ);
goto retry_timeout;
case -ETIMEDOUT:
Expand Down

0 comments on commit b79dc8c

Please sign in to comment.