From: Bart Van Assche Date: Fri, 28 Jun 2013 12:49:58 +0000 (+0200) Subject: IB/srp: Fail I/O fast if target offline X-Git-Tag: v3.11-rc1~16^2~1^7~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=99e1c1398f44a056b16e78122133988c82b66d97;p=karo-tx-linux.git 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 Acked-by: David Dillow Signed-off-by: Roland Dreier --- 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);