Files
libiscsi/lib
Ronnie Sahlberg a3ce92c93c Fix sending of unsolicited data in the first burst
When deciding if to generate a data out queue for the first sequence
the test was wrong.
We should not check if INITIAL_R2T is NO and IMMEDIATE_DATA=NO.
Immediate data does not matter here.

What we should check is IF we have more data we need to send and IF
INITIAL_R2T allows us to send more data, then we generate a train of DATA-OUT.

If MaxRecvDataSegmentLength is less than FirstBurstLength we will often have
to send unsolicited data as both ImmediateData and also as unsolicited
DATA-OUT PDUs.

Example:
Assume Target has responded :
MaxRecvDataSegmentLength = 8k
FirstBurstLength = 64k
ImmediateData=YES
InitialR2T=NO

Then this should generate the following sequence :
I->T   ISCSI_COMMAND + 8K of immediate data. F-Bit is not set.
I->T   DATA-OUT 8K
I->T   DATA-OUT 8K
I->T   DATA-OUT 8K
I->T   DATA-OUT 8K
I->T   DATA-OUT 8K
I->T   DATA-OUT 8K
I->T   DATA-OUT 8K. Final PDU in sequence   so F-bit is set.
T->I   R2T
...
2012-12-02 09:55:07 -08:00
..
MD5
2010-12-22 21:57:58 +11:00
2012-11-28 18:44:22 +01:00
2012-11-29 19:14:26 -08:00