Commit 5893d6a2 authored by Bart Van Assche's avatar Bart Van Assche Committed by Kamal Mostafa

IB/srp: Fix reconnection failure handling

commit a44074f1 upstream.

Although it is possible to let SRP I/O continue if a reconnect
results in a reduction of the number of channels, the current
code does not handle this scenario correctly. Instead of making
the reconnect code more complex, consider this as a reconnection
failure.
Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 329ee6bf
......@@ -1242,11 +1242,8 @@ static int srp_rport_reconnect(struct srp_rport *rport)
for (i = 0; i < target->ch_count; i++) {
ch = &target->ch[i];
if (ret || !ch->target) {
if (i > 1)
ret = 0;
if (ret || !ch->target)
break;
}
ret = srp_connect_ch(ch, multich);
multich = true;
}
......
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