Remove the iscsi data alloc_size field.

Avoiding to realloc data over and over should rather be handled with something
similar to iovectors instead.
This commit is contained in:
Ronnie Sahlberg
2012-11-25 19:22:37 -08:00
parent bb755104e5
commit 9f741ad2e3
3 changed files with 10 additions and 24 deletions

View File

@@ -438,7 +438,7 @@ iscsi_process_scsi_data_in(struct iscsi_context *iscsi, struct iscsi_pdu *pdu,
/* Dont add to reassembly buffer if we already have a user buffer */
if (scsi_task_get_data_in_buffer(task, 0, NULL) == NULL) {
if (task->expxferlen > dsl && pdu->indata.data == NULL) {
pdu->indata.alloc_size = task->expxferlen;
pdu->indata.size = task->expxferlen;
pdu->indata.data = iscsi_malloc(iscsi, task->expxferlen);
if (pdu->indata.data == NULL) {
iscsi_set_error(iscsi, "Out-of-memory: failed to allocate pdu indata buffer");