Mike Christie wrote:
>> The second patch is the more important one, as it
>> fixes an error during LUN Reset handling in the
>> initiator. When sending a LUN Reset during an
>> ongoing R2T transfer, we're suspending Tx and
>> aborting all _SCSI_ tasks. However, once we're
>> done there we're resuming Tx and the R2T transfer
>> will happily continue. So we should rather be
> This should not be happening. When iscsi_suspend_tx returns the tx 
> thread has stopped so we know there are no users accessing the task 
> (well, there could be if a target is sending a tmf response then a r2t, 
> but if the target is following the rfc there should not be).
> So when fail_scsi_tasks calls
> fail_scsi_task ->iscsi_complete_task (this will cleanup conn->task if 
> this is the same task) -> __iscsi_put_task
> this should be the last put on the task and that should release it 
> calling iscsi_free_task which should call cleanup_task to kill any 
> pending r2t handling and it would remove it from the requeue list.
> If we are sending a data-out for a task that has had fail_scsi_task 
> ->iscsi_complete_task -> __iscsi_put_task called for it then we are in 
> bigger trouble because the last put should have been called on it and we 
>   are accessing a bad task.
I fully agree, this is something which shouldn't happen.

However, using this patch stops me from receiving invalid R2T PDUs.
So I can't be that far off the mark.


Dr. Hannes Reinecke                   zSeries & Storage
h...@suse.de                          +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at http://groups.google.com/group/open-iscsi

Reply via email to