HeikoKoehler / istgt

Automatically exported from code.google.com/p/istgt
Other
0 stars 0 forks source link

Read residual data fields not sent when EDTL is 0 #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Running the libiscsi 0105_read10_invalid test against istgt, I noticed that the 
0105_read10_invalid test "Read10 1 block but with iscsi 
ExpectedDataTransferLength==0" fails.

This appears to be due to the fact that the queued and non-queued SCSI response 
code paths only calculate and set the residual fields if 
ExpectedDataTransferLength is non zero.

Original issue reported on code.google.com by ddiss....@gmail.com on 21 Dec 2014 at 9:25

GoogleCodeExporter commented 9 years ago
@Daisuke Aoyama, please review the attached patch, based atop 
istgt-20141125.tar.gz.

Original comment by ddiss....@gmail.com on 21 Dec 2014 at 10:19

Attachments:

GoogleCodeExporter commented 9 years ago
Pushed to devel_20141125 branch:

commit 8d747dfd7e1414e04d5abf7b7c89876542560c48
Author: David Disseldorp <ddiss@suse.de>
Date:   Sun Dec 21 23:12:15 2014 +0100

    iscsi: fill residual fields when EDTL is zero

    The queued and non-queued SCSI response code paths only calculate and
    set the residual fields if ExpectedDataTransferLength is non-zero. This
    change ensures that the values are also filled when EDTL is zero.

    This bug was found using the libiscsi 0105_read10_invalid "Read10 1
    block but with iscsi ExpectedDataTransferLength==0" test.

    Signed-off-by: David Disseldorp <ddiss@suse.de>

Original comment by ddiss....@gmail.com on 22 Dec 2014 at 12:05