iscsi: restore data_transferred accumulation for read
In the patch 393582, by analyzing the code, accumulation of write completion to bdev was duplicated by data_transferred and bytes_completed. Hence accumulation of data_transferred for write was intended to be removed. However by mistake accumulation of data_transferred for read was removed. In this patch restore accumulation of data_transferred for read and remove accumlation of data_transferred for write. Test code to catch this degradation will be added by another patch soon. Change-Id: Iea9883e8ef1bfb0bdf00e291712e6faf2fad281f Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/393713 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Ziye Yang <optimistyzy@gmail.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
c013db36fc
commit
60f1d52605
@ -1070,9 +1070,6 @@ spdk_iscsi_task_cpl(struct spdk_scsi_task *scsi_task)
|
||||
if (spdk_iscsi_task_is_read(primary)) {
|
||||
process_read_task_completion(conn, task, primary);
|
||||
} else {
|
||||
if (task != primary) {
|
||||
primary->scsi.data_transferred += task->scsi.data_transferred;
|
||||
}
|
||||
primary->bytes_completed += task->scsi.length;
|
||||
if ((task != primary) &&
|
||||
(task->scsi.status != SPDK_SCSI_STATUS_GOOD)) {
|
||||
|
@ -2834,6 +2834,9 @@ 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user