Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2429cbf6a1566b8e92436d615387e4250feab46b Commit: 2429cbf6a1566b8e92436d615387e4250feab46b Parent: 4784cb51a3f66d401f8a08810231aa7dc8f44e43 Author: Chuck Lever <[EMAIL PROTECTED]> AuthorDate: Tue Sep 11 18:00:41 2007 -0400 Committer: Trond Myklebust <[EMAIL PROTECTED]> CommitDate: Tue Oct 9 17:16:53 2007 -0400
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: Chuck Lever <[EMAIL PROTECTED]> Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]> --- net/sunrpc/clnt.c | 6 ++++++ net/sunrpc/rpcb_clnt.c | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 7a7cd3b..e53d718 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -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); diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index a0c9f69..9b06a21 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c @@ -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; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html