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 <[email protected]>
Acked-by: David Dillow <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
This commit is contained in:
Bart Van Assche 2013-06-28 14:49:58 +02:00 • committed by Roland Dreier
commit 99e1c1398f

View file

@ -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);