Skip to content

Commit

Permalink
IB/srp: Fail I/O fast if target offline
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bart Van Assche authored and Roland Dreier committed Jul 1, 2013
1 parent 2742c1d commit 99e1c13
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 99e1c13

Please sign in to comment.