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

Commit 76303992 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 8014793b
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -1030,6 +1030,14 @@ call_status(struct rpc_task *task)


	task->tk_status = 0;
	task->tk_status = 0;
	switch(status) {
	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:
	case -ETIMEDOUT:
		task->tk_action = call_timeout;
		task->tk_action = call_timeout;
		break;
		break;