diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-11-30 07:21:33 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2017-11-30 11:52:52 -0500 |
commit | eb5b46faa693470681ec7c28cc2436edd1571198 (patch) | |
tree | 4dda330a6762139caa411bc372f49e38ffb6a56c /net | |
parent | 4ba161a793d5f43757c35feff258d9f20a082940 (diff) |
SUNRPC: Handle ENETDOWN errors
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/clnt.c | 5 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index a801da812f86..e2a4184f3c5d 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -1841,6 +1841,7 @@ call_bind_status(struct rpc_task *task) | |||
1841 | case -ECONNABORTED: | 1841 | case -ECONNABORTED: |
1842 | case -ENOTCONN: | 1842 | case -ENOTCONN: |
1843 | case -EHOSTDOWN: | 1843 | case -EHOSTDOWN: |
1844 | case -ENETDOWN: | ||
1844 | case -EHOSTUNREACH: | 1845 | case -EHOSTUNREACH: |
1845 | case -ENETUNREACH: | 1846 | case -ENETUNREACH: |
1846 | case -ENOBUFS: | 1847 | case -ENOBUFS: |
@@ -1917,6 +1918,7 @@ call_connect_status(struct rpc_task *task) | |||
1917 | /* fall through */ | 1918 | /* fall through */ |
1918 | case -ECONNRESET: | 1919 | case -ECONNRESET: |
1919 | case -ECONNABORTED: | 1920 | case -ECONNABORTED: |
1921 | case -ENETDOWN: | ||
1920 | case -ENETUNREACH: | 1922 | case -ENETUNREACH: |
1921 | case -EHOSTUNREACH: | 1923 | case -EHOSTUNREACH: |
1922 | case -EADDRINUSE: | 1924 | case -EADDRINUSE: |
@@ -2022,6 +2024,7 @@ call_transmit_status(struct rpc_task *task) | |||
2022 | */ | 2024 | */ |
2023 | case -ECONNREFUSED: | 2025 | case -ECONNREFUSED: |
2024 | case -EHOSTDOWN: | 2026 | case -EHOSTDOWN: |
2027 | case -ENETDOWN: | ||
2025 | case -EHOSTUNREACH: | 2028 | case -EHOSTUNREACH: |
2026 | case -ENETUNREACH: | 2029 | case -ENETUNREACH: |
2027 | case -EPERM: | 2030 | case -EPERM: |
@@ -2071,6 +2074,7 @@ call_bc_transmit(struct rpc_task *task) | |||
2071 | switch (task->tk_status) { | 2074 | switch (task->tk_status) { |
2072 | case 0: | 2075 | case 0: |
2073 | /* Success */ | 2076 | /* Success */ |
2077 | case -ENETDOWN: | ||
2074 | case -EHOSTDOWN: | 2078 | case -EHOSTDOWN: |
2075 | case -EHOSTUNREACH: | 2079 | case -EHOSTUNREACH: |
2076 | case -ENETUNREACH: | 2080 | case -ENETUNREACH: |
@@ -2139,6 +2143,7 @@ call_status(struct rpc_task *task) | |||
2139 | task->tk_status = 0; | 2143 | task->tk_status = 0; |
2140 | switch(status) { | 2144 | switch(status) { |
2141 | case -EHOSTDOWN: | 2145 | case -EHOSTDOWN: |
2146 | case -ENETDOWN: | ||
2142 | case -EHOSTUNREACH: | 2147 | case -EHOSTUNREACH: |
2143 | case -ENETUNREACH: | 2148 | case -ENETUNREACH: |
2144 | case -EPERM: | 2149 | case -EPERM: |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index c2b2d489b57b..7fa94abfd6b2 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -2439,6 +2439,7 @@ static void xs_tcp_setup_socket(struct work_struct *work) | |||
2439 | */ | 2439 | */ |
2440 | case -ECONNREFUSED: | 2440 | case -ECONNREFUSED: |
2441 | case -ECONNRESET: | 2441 | case -ECONNRESET: |
2442 | case -ENETDOWN: | ||
2442 | case -ENETUNREACH: | 2443 | case -ENETUNREACH: |
2443 | case -EHOSTUNREACH: | 2444 | case -EHOSTUNREACH: |
2444 | case -EADDRINUSE: | 2445 | case -EADDRINUSE: |