Skip to content

Commit

Permalink
IB/srp: Fix reconnection failure handling
Browse files Browse the repository at this point in the history
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: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
Cc: <stable@vger.kernel.org> #v3.19
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Bart Van Assche authored and Doug Ledford committed May 18, 2015
1 parent c014c8c commit a44074f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1243,11 +1243,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;
}
Expand Down

0 comments on commit a44074f

Please sign in to comment.