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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user