summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
authorTrond Myklebust2006-08-30 20:32:49 +0200
committerTrond Myklebust2006-09-23 05:24:56 +0200
commit76303992b4701124f4cd0791ae2049ab4332f02c (patch)
tree2f364988b34340e2b4698facdbd84818c224c0d6 /net/sunrpc/clnt.c
parentSUNRPC: rpc_delay() should not clobber the rpc_task->tk_status (diff)
downloadkernel-qcow2-linux-76303992b4701124f4cd0791ae2049ab4332f02c.tar.gz
kernel-qcow2-linux-76303992b4701124f4cd0791ae2049ab4332f02c.tar.xz
kernel-qcow2-linux-76303992b4701124f4cd0791ae2049ab4332f02c.zip
SUNRPC: Handle ENETUNREACH, EHOSTUNREACH and EHOSTDOWN socket errors
In case of any of the above errors occuring, delay for 3 seconds, then handle as if it were a timeout error. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 87efcd207f23..355e7863c0aa 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1030,6 +1030,14 @@ call_status(struct rpc_task *task)
task->tk_status = 0;
switch(status) {
+ case -EHOSTDOWN:
+ case -EHOSTUNREACH:
+ case -ENETUNREACH:
+ /*
+ * Delay any retries for 3 seconds, then handle as if it
+ * were a timeout.
+ */
+ rpc_delay(task, 3*HZ);
case -ETIMEDOUT:
task->tk_action = call_timeout;
break;