]>
Commit | Line | Data |
---|---|---|
85291088 GKH |
1 | From 2bc1c59dbdefdb6f9767e06efb86bbdb2923a8be Mon Sep 17 00:00:00 2001 |
2 | From: Mike Christie <michaelc@cs.wisc.edu> | |
3 | Date: Thu, 5 Nov 2009 11:18:09 -0600 | |
4 | Subject: [SCSI] fc class: fail fast bsg requests | |
5 | ||
6 | From: Mike Christie <michaelc@cs.wisc.edu> | |
7 | ||
8 | commit 2bc1c59dbdefdb6f9767e06efb86bbdb2923a8be upstream. | |
9 | ||
10 | If the port state is blocked and the fast io fail tmo has | |
11 | fired then this patch will fail bsg requests immediately. | |
12 | This is needed if userspace is sending IOs to test the transport | |
13 | like with fcping, so it will not have to wait for the dev loss tmo. | |
14 | With this patch he bsg req fast io fail code behaves like the normal | |
15 | and sg io/passthrough fast io fail. | |
16 | ||
17 | Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> | |
18 | Acked-By: James Smart <james.smart@emulex.com> | |
19 | Signed-off-by: James Bottomley <James.Bottomley@suse.de> | |
20 | Cc: maximilian attems <max@stro.at> | |
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
22 | ||
23 | --- | |
24 | drivers/scsi/scsi_transport_fc.c | 5 +++-- | |
25 | 1 file changed, 3 insertions(+), 2 deletions(-) | |
26 | ||
27 | --- a/drivers/scsi/scsi_transport_fc.c | |
28 | +++ b/drivers/scsi/scsi_transport_fc.c | |
29 | @@ -3796,8 +3796,9 @@ fc_bsg_request_handler(struct request_qu | |
30 | return; | |
31 | ||
32 | while (!blk_queue_plugged(q)) { | |
33 | - if (rport && (rport->port_state == FC_PORTSTATE_BLOCKED)) | |
34 | - break; | |
35 | + if (rport && (rport->port_state == FC_PORTSTATE_BLOCKED) && | |
36 | + !(rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT)) | |
37 | + break; | |
38 | ||
39 | req = blk_fetch_request(q); | |
40 | if (!req) |