Skip to contentSkip to conversation

SUNRPC: RPC bind failures should be permanent for NULL requests

PATCH New Chuck Lever 1 participant 1 message Aug 29, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 4/8 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 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 quickly, and then allow an immediate retry with different options.

---

 net/sunrpc/clnt.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
net/sunrpc/clnt.c +6 -1
index 9a220af..8fc05a1 100644
@@ -949,7 +949,12 @@ call_bind_status(struct rpc_task *task)
 	switch (task->tk_status) {
 	case -EACCES:
 		dprintk("RPC: %5u remote rpcbind: RPC program/version "
-				"unavailable\n", task->tk_pid);
+				"not available\n", task->tk_pid);
+		/* fail immediately if this is an RPC ping */
+		if (task->tk_msg.rpc_proc->p_proc == 0) {
+			status = -ENOPROTOOPT;
+			break;
+		}
 		rpc_delay(task, 3*HZ);
 		goto retry_timeout;
 	case -EAGAIN:

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs