Skip to content

Commit 82ee41b

Browse files
olgakorn1Trond Myklebust
authored andcommitted
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: 6f08169 ("sunrpc: remove an offlined xprt using sysfs") Signed-off-by: Olga Kornievskaia <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 3de24f3 commit 82ee41b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

net/sunrpc/clnt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,9 @@ rpc_task_get_next_xprt(struct rpc_clnt *clnt)
10651065
static
10661066
void rpc_task_set_transport(struct rpc_task *task, struct rpc_clnt *clnt)
10671067
{
1068-
if (task->tk_xprt)
1068+
if (task->tk_xprt &&
1069+
!(test_bit(XPRT_OFFLINE, &task->tk_xprt->state) &&
1070+
(task->tk_flags & RPC_TASK_MOVEABLE)))
10691071
return;
10701072
if (task->tk_flags & RPC_TASK_NO_ROUND_ROBIN)
10711073
task->tk_xprt = rpc_task_get_first_xprt(clnt);

0 commit comments

Comments
 (0)