reconnect: we need to reset the in/out iovectors on reconnect

This is a bug that has been there a long time.
When we reconnect and requeue a PDU we must reset the iovectors
for the task. Otherwise, any partially sent/received data when the
command is reconnected would end up containing garbage.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2015-02-24 06:54:18 -08:00
parent 76f8296dbb
commit 6822baee3f
3 changed files with 12 additions and 0 deletions

View File

@@ -324,6 +324,7 @@ void iscsi_set_error(struct iscsi_context *iscsi, const char *error_string,
struct scsi_iovector *iscsi_get_scsi_task_iovector_in(struct iscsi_context *iscsi, struct iscsi_in_pdu *in);
struct scsi_iovector *iscsi_get_scsi_task_iovector_out(struct iscsi_context *iscsi, struct iscsi_pdu *pdu);
void scsi_task_reset_iov(struct scsi_iovector *iovector);
void* iscsi_malloc(struct iscsi_context *iscsi, size_t size);
void* iscsi_zmalloc(struct iscsi_context *iscsi, size_t size);