On 01.07.2013 13:33, Bart Van Assche wrote:
>>> --- a/drivers/infiniband/ulp/srp/ib_srp.c
>>> +++ b/drivers/infiniband/ulp/srp/ib_srp.c
>>> @@ -1755,6 +1755,8 @@ static int srp_abort(struct scsi_cmnd *scmnd)
>>>       if (srp_send_tsk_mgmt(target, req->index, scmnd->device->lun,
>>>                     SRP_TSK_ABORT_TASK) == 0)
>>>           ret = SUCCESS;
>>> +    else if (target->transport_offline)
>>> +        ret = FAST_IO_FAIL;
>>>       else
>>>           ret = FAILED;
>>>       srp_free_req(target, req, scmnd, 0);
>>>
>>
>> This doesn't give us much speed advantage IMHO. The check for
>> target->transport_offline should be before calling srp_send_tsk_mgmt().
>>
>> This way it would also match the patch description better.
> 
> Hello Sebastian,
> 
> Had you perhaps overlooked the following code at the start of
> srp_send_tsk_mgmt() ?
> 
>     if (!target->connected || target->qp_in_error)
>         return -1;
> 
> Given this I don't think it matters whether the transport_offline check
> occurs before or after the srp_send_tsk_mgmt() call.

Hi Bart,

okay, right. So you get an error due to the connected and qp_in_error
state first. Yes, I've overlooked that. Thanks!

Cheers,
Sebastian

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to