Commit 285f4f11 authored by Mike Christie's avatar Mike Christie Committed by Greg Kroah-Hartman

fc class: fail fast bsg requests

commit 2bc1c59d upstream.

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: default avatarMike Christie <michaelc@cs.wisc.edu>
Acked-By: default avatarJames Smart <james.smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
Cc: maximilian attems <max@stro.at>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 56d70410
......@@ -3796,8 +3796,9 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost,
return;
while (!blk_queue_plugged(q)) {
if (rport && (rport->port_state == FC_PORTSTATE_BLOCKED))
break;
if (rport && (rport->port_state == FC_PORTSTATE_BLOCKED) &&
!(rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT))
break;
req = blk_fetch_request(q);
if (!req)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment