vhost: use task length rather than transfer_len

The SCSI task transfer_len field is only distinct from length in iSCSI;
vhost should always have length == transfer_len.

Change-Id: I37faec26f0f49c27019a965c1f1f48903ca54b58
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393203
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Daniel Verkamp 2017-12-28 13:35:37 -07:00 committed by Jim Harris
parent ddfc063f90
commit a7de1070c3

View File

@ -240,7 +240,8 @@ spdk_vhost_scsi_task_cpl(struct spdk_scsi_task *scsi_task)
memcpy(task->resp->sense, task->scsi.sense_data, task->scsi.sense_data_len);
task->resp->sense_len = task->scsi.sense_data_len;
}
task->resp->resid = task->scsi.transfer_len - task->scsi.data_transferred;
assert(task->scsi.transfer_len == task->scsi.length);
task->resp->resid = task->scsi.length - task->scsi.data_transferred;
submit_completion(task);
}