Commit 82ee41b8 authored by Olga Kornievskaia's avatar Olga Kornievskaia Committed by Trond Myklebust

SUNRPC don't resend a task on an offlined transport

When a task is being retried, due to an NFS error, if the assigned
transport has been put offline and the task is relocatable pick a new
transport.

Fixes: 6f081693 ("sunrpc: remove an offlined xprt using sysfs")
Signed-off-by: default avatarOlga Kornievskaia <kolga@netapp.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 3de24f3d
...@@ -1065,7 +1065,9 @@ rpc_task_get_next_xprt(struct rpc_clnt *clnt) ...@@ -1065,7 +1065,9 @@ rpc_task_get_next_xprt(struct rpc_clnt *clnt)
static static
void rpc_task_set_transport(struct rpc_task *task, struct rpc_clnt *clnt) void rpc_task_set_transport(struct rpc_task *task, struct rpc_clnt *clnt)
{ {
if (task->tk_xprt) if (task->tk_xprt &&
!(test_bit(XPRT_OFFLINE, &task->tk_xprt->state) &&
(task->tk_flags & RPC_TASK_MOVEABLE)))
return; return;
if (task->tk_flags & RPC_TASK_NO_ROUND_ROBIN) if (task->tk_flags & RPC_TASK_NO_ROUND_ROBIN)
task->tk_xprt = rpc_task_get_first_xprt(clnt); task->tk_xprt = rpc_task_get_first_xprt(clnt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment