Thread (1 message) 1 message, 1 author, 2013-02-18

Re: [PATCH] IB/srp: Fail I/O requests if the transport is offline

From: Sagi Grimberg <hidden>
Date: 2013-02-18 08:11:03

On 2/18/2013 6:06 AM, David Dillow wrote:
On Fri, 2013-02-15 at 10:39 +0100, Bart Van Assche wrote:
quoted
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 8a7eb9f..b34752d 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -734,6 +734,7 @@ static int srp_reconnect_target(struct srp_target_port *target)
  
  	scsi_target_unblock(&shost->shost_gendev, ret == 0 ? SDEV_RUNNING :
  			    SDEV_TRANSPORT_OFFLINE);
+	target->transport_offline = ret != 0;
Minor nit, that line is hard to read; I keep thinking it needs parens
around the conditional...

Perhaps
	target->transport_offline = !!ret;
or
	target->transport_offline = ret;

gcc should do the right conversion since we're assigning to a bool.


Or, Vu, does this solve the issue you've seen? I may have time to test
later this week, but not before.
Hey David,

This indeed solve scsi_host removal issues.
Vu is on vacation, I'll perform some more failover tests...

-Sagi
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help