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

@@ -351,6 +351,9 @@ try_again:
continue;
}
scsi_task_reset_iov(&pdu->scsi_cbdata.task->iovector_in);
scsi_task_reset_iov(&pdu->scsi_cbdata.task->iovector_out);
/* We pass NULL as 'd' since any databuffer has already
* been converted to a task-> iovector first time this
* PDU was sent.