iscsi: Remove duplication of the variable for write completion to bdev

This patch will follow the change 393212 by Daniel.

For read command:
- primary's scsi.bytes_completed is for read completion from bdev.
- primary's scsi.data_transferred si for send completion to initiator.

Two variables have its own meaning, respectively.

However for write command:
- both primary's scsi.bytes_completed and scsi.data_transferred are
  for write completion to bdev.

Hence for write we should use only either one and it looks that
bytes_completed will be appropriate.

Change-Id: I991c00170ad3651fe926173657e8a49a9a38d02a
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/393582
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Shuhei Matsumoto 2018-01-04 10:13:33 +09:00 committed by Jim Harris
parent 96353bb19b
commit 8bb603da82

View File

@ -2834,9 +2834,6 @@ spdk_iscsi_transfer_in(struct spdk_iscsi_conn *conn,
}
}
if (task != primary) {
primary->scsi.data_transferred += task->scsi.data_transferred;
}
primary->datain_datasn = DataSN;
if (sent_status) {
@ -3197,7 +3194,7 @@ void spdk_iscsi_task_response(struct spdk_iscsi_conn *conn,
o_bit = u_bit = O_bit = U_bit = 0;
bidi_residual_len = residual_len = 0;
data_len = primary->scsi.data_transferred;
data_len = primary->bytes_completed;
if ((transfer_len != 0) &&
(task->scsi.status == SPDK_SCSI_STATUS_GOOD)) {