aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_fc.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2009-11-05 12:18:09 -0500
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 13:01:32 -0500
commit2bc1c59dbdefdb6f9767e06efb86bbdb2923a8be (patch)
tree93354f4eccceb4f86eaa5ad50274ce3460ede74d /drivers/scsi/scsi_transport_fc.c
parent97ee20886cfd257a7818087c1638ca60b9ffd192 (diff)
[SCSI] fc class: fail fast bsg requests
If the port state is blocked and the fast io fail tmo has fired then this patch will fail bsg requests immediately. This is needed if userspace is sending IOs to test the transport like with fcping, so it will not have to wait for the dev loss tmo. With this patch he bsg req fast io fail code behaves like the normal and sg io/passthrough fast io fail. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-By: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/scsi_transport_fc.c')
-rw-r--r--drivers/scsi/scsi_transport_fc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 3ce56b3b2cd..600502aa3b6 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -3809,8 +3809,9 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost,
3809 return; 3809 return;
3810 3810
3811 while (!blk_queue_plugged(q)) { 3811 while (!blk_queue_plugged(q)) {
3812 if (rport && (rport->port_state == FC_PORTSTATE_BLOCKED)) 3812 if (rport && (rport->port_state == FC_PORTSTATE_BLOCKED) &&
3813 break; 3813 !(rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT))
3814 break;
3814 3815
3815 req = blk_fetch_request(q); 3816 req = blk_fetch_request(q);
3816 if (!req) 3817 if (!req)