From: Bart Van Assche <bart.vanassche@sandisk.com>
To: Doug Ledford <dledford@redhat.com>
Cc: James Bottomley <jbottomley@odin.com>,
Sagi Grimberg <sagig@mellanox.com>,
Sebastian Parschauer <sebastian.riemer@profitbricks.com>,
linux-rdma <linux-rdma@vger.kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: [PATCH v2 06/12] IB/srp: Fix reconnection failure handling
Date: Mon, 18 May 2015 13:24:17 +0200 [thread overview]
Message-ID: <5559CBE1.9000202@sandisk.com> (raw)
In-Reply-To: <5559CB3A.6060102@sandisk.com>
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
---
drivers/infiniband/ulp/srp/ib_srp.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 83e4d8a..982e329 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1259,11 +1259,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;
}
--
2.1.4
next prev parent reply other threads:[~2015-05-18 11:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 11:21 [PATCH v2 00/12] IB/srp patches for kernel v4.2 Bart Van Assche
2015-05-18 11:22 ` [PATCH v2 01/12] scsi_transport_srp: Introduce srp_wait_for_queuecommand() Bart Van Assche
2015-05-18 11:24 ` Bart Van Assche [this message]
2015-05-18 11:25 ` [PATCH v2 08/12] IB/srp: Remove superfluous casts Bart Van Assche
[not found] ` <5559CB3A.6060102-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2015-05-18 11:22 ` [PATCH v2 02/12] scsi_transport_srp: Fix a race condition Bart Van Assche
2015-05-18 11:23 ` [PATCH v2 03/12] IB/srp: Remove an extraneous scsi_host_put() from an error path Bart Van Assche
2015-05-18 11:23 ` [PATCH v2 04/12] IB/srp: Fix a connection setup race Bart Van Assche
2015-05-18 11:23 ` [PATCH v2 05/12] IB/srp: Fix connection state tracking Bart Van Assche
2015-05-18 11:24 ` [PATCH v2 07/12] scsi_transport_srp: Reduce failover time Bart Van Assche
2015-05-18 11:25 ` [PATCH v2 09/12] IB/srp: Rearrange module description Bart Van Assche
2015-05-18 11:25 ` [PATCH v2 10/12] IB/srp: Remove a superfluous check from srp_free_req_data() Bart Van Assche
2015-05-18 11:26 ` [PATCH v2 11/12] IB/srp: Remove !ch->target tests from the reconnect code Bart Van Assche
2015-05-18 11:27 ` [PATCH v2 12/12] IB/srp: Add 64-bit LUN support Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5559CBE1.9000202@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=dledford@redhat.com \
--cc=jbottomley@odin.com \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=sagig@mellanox.com \
--cc=sebastian.riemer@profitbricks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox