Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Mike Christie and committed by
James Bottomley
2bc1c59d 97ee2088

+3 -2
+3 -2
drivers/scsi/scsi_transport_fc.c
··· 3809 3809 return; 3810 3810 3811 3811 while (!blk_queue_plugged(q)) { 3812 - if (rport && (rport->port_state == FC_PORTSTATE_BLOCKED)) 3813 - break; 3812 + if (rport && (rport->port_state == FC_PORTSTATE_BLOCKED) && 3813 + !(rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT)) 3814 + break; 3814 3815 3815 3816 req = blk_fetch_request(q); 3816 3817 if (!req)