Re: [PATCH v1 10/13] IB/iser: Support T10-PI operations

Sagi Grimberg
2014-03-04T17:04:05Z

On 3/4/2014 6:16 PM, Or Gerlitz wrote:
> On 04/03/2014 16:44, Sagi Grimberg wrote:
>>>> @@ -1707,10 +1707,17 @@ int iscsi_queuecommand(struct Scsi_Host
>>>> *host, struct scsi_cmnd *sc)
>>>> goto prepd_fault;
>>>> }
>>>> }
>>>> - if (session->tt->xmit_task(task)) {
>>>> - session->cmdsn--;
>>>> - reason = FAILURE_SESSION_NOT_READY;
>>>> - goto prepd_reject;
>>>> +
>>>> + reason = session->tt->xmit_task(task);
>>>> + if (reason) {
>>>> + if (reason == -ENOMEM || reason == -EAGAIN) {
>>>> + session->cmdsn--;
>>>
>>> I am pretty sure this has to be done anyway, no matter why the
>>> xmit_task callback failed
>>
>> Even if we abort? this just follows the same logic as
>> iscsi_prep_scsi_cmd_pdu error flow.
>
> yes, take a 2nd look on iscsi_prep_scsi_cmd_pdu and you'll see that
> all the possible error cases take place **before** session->cmdsn is
> incremented

Ahhh, yes... So dec the cmdsn regardless.

Mike, are you on board with this?

Sagi.