summaryrefslogtreecommitdiff
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2013-06-28 16:49:58 +0400
committerRoland Dreier <roland@purestorage.com>2013-07-01 21:37:13 +0400
commit99e1c1398f44a056b16e78122133988c82b66d97 (patch)
treedf0d03078df9246b570c2260bf9edc89b09a73b5 /drivers/infiniband
parent2742c1dadde602baea6f0547c028154aebd6f1ca (diff)
downloadlinux-99e1c1398f44a056b16e78122133988c82b66d97.tar.xz
IB/srp: Fail I/O fast if target offline
If reconnecting failed we know that no command completion will be received anymore. Hence let the SCSI error handler fail such commands immediately. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: David Dillow <dillowda@ornl.gov> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index bc13c8db7fc2..1f331011653e 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1754,6 +1754,8 @@ static int srp_abort(struct scsi_cmnd *scmnd)
SRP_TSK_ABORT_TASK) == 0 ||
target->transport_offline)
ret = SUCCESS;
+ else if (target->transport_offline)
+ ret = FAST_IO_FAIL;
else
ret = FAILED;
srp_free_req(target, req, scmnd, 0);