Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2429cbf6 authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust
Browse files

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: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 4784cb51
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -950,6 +950,12 @@ call_bind_status(struct rpc_task *task)
	}

	switch (task->tk_status) {
	case -EAGAIN:
		dprintk("RPC: %5u rpcbind waiting for another request "
				"to finish\n", task->tk_pid);
		/* avoid busy-waiting here -- could be a network outage. */
		rpc_delay(task, 5*HZ);
		goto retry_timeout;
	case -EACCES:
		dprintk("RPC: %5u remote rpcbind: RPC program/version "
				"unavailable\n", task->tk_pid);
+1 −1
Original line number Diff line number Diff line
@@ -341,7 +341,7 @@ void rpcb_getport_async(struct rpc_task *task)
	BUG_ON(clnt->cl_parent != clnt);

	if (xprt_test_and_set_binding(xprt)) {
		status = -EACCES;		/* tell caller to check again */
		status = -EAGAIN;	/* tell caller to check again */
		dprintk("RPC: %5u %s: waiting for another binder\n",
			task->tk_pid, __FUNCTION__);
		goto bailout_nowake;