Mike Christie wrote:
> On 08/07/2009 05:27 AM, Hannes Reinecke wrote:
>> When checking for the SUSPEND bit we have to make sure
>> to transfer complete PDUs, otherwise the target will barf.
>>
> 
> 
> What do you mean it will barf?
> 
> We normally will eventually send the other part of the PDU. We have
> these cases:
> 
> 
> 1. If we are doing ERL0 then we won't, but it does not matter because we
> kill the tcp/ip connection and iscsi connection/session.
> 
Sure. But we're not doing ERL0 here (yet), just a LU Reset as triggered
by sg_reset.

> 2. If we get suspended because of a TMF cleanup, then we would hit that,
> but when the xmit thread resumes conn->task will be this task so we will
> start it up again.
>     - The exception is here if conn->task is the one we are aborting or
> is affected by the reset. However, in this case the target should not be
> sending a tmf response while it is waiting for the data to be sent.
> 
That's not quite the case. The target expects us to finish any outstanding
R2T transaction even after a tmf response has been send. So we're busy
transferring the outstanding data, when the tmf response is being
processed with the eh thread. At one point the eh thread is suspending
the connection; and if we're then in the middle of sending a data-out
PDU, the target will drop the connection more-or-less immediately.

And anyway, this would affect any running PDU transfer even for
other (unaffected LUNs), so I fail to see the harm here.
We should always transfer complete PDUs, as the PDU transfer
started before the SUSPEND bit was set.
And as such we can as well transfer the entire PDU ...

Cheers,

Hannes
-- 
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 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to