From: Mike Christie Date: Wed, 24 Sep 2008 16:46:09 +0000 (-0500) Subject: [SCSI] libiscsi: fix data corruption when target has to resend data-in packets X-Git-Tag: v2.6.28-rc1~263^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d9edf0270cb5a434d32e95279ce9493581906b3;p=pandora-kernel.git [SCSI] libiscsi: fix data corruption when target has to resend data-in packets iscsi_tcp was updating the exp_statsn (exp_statsn acknowledges status and tells the target it is ok to let the resources for a iscsi pdu to be reused) before it got all the data for pdu read into OS buffers. Data corruption was occuring if something happens to a packet and the network layer requests a retransmit, and the initiator has told the target about the udpated exp_statsn ack, then the target may be sending data from a buffer it has reused for a new iscsi pdu. This fixes the problem by having the LLD (iscsi_tcp in this case) just handle the transferring of data, and has libiscsi handle the processing of status (libiscsi completion processing is done after LLD data transfers are complete). Signed-off-by: Mike Christie Signed-off-by: James Bottomley --- Reading git-diff-tree failed