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