diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-08-30 14:32:49 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-09-22 23:24:56 -0400 |
commit | 76303992b4701124f4cd0791ae2049ab4332f02c (patch) | |
tree | 2f364988b34340e2b4698facdbd84818c224c0d6 /net/sunrpc | |
parent | 8014793b1b2869445adfe678d64cdacd10e99d53 (diff) |
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')
-rw-r--r-- | net/sunrpc/clnt.c | 8 |
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) | |||
1030 | 1030 | ||
1031 | task->tk_status = 0; | 1031 | task->tk_status = 0; |
1032 | switch(status) { | 1032 | switch(status) { |
1033 | case -EHOSTDOWN: | ||
1034 | case -EHOSTUNREACH: | ||
1035 | case -ENETUNREACH: | ||
1036 | /* | ||
1037 | * Delay any retries for 3 seconds, then handle as if it | ||
1038 | * were a timeout. | ||
1039 | */ | ||
1040 | rpc_delay(task, 3*HZ); | ||
1033 | case -ETIMEDOUT: | 1041 | case -ETIMEDOUT: |
1034 | task->tk_action = call_timeout; | 1042 | task->tk_action = call_timeout; |
1035 | break; | 1043 | break; |