a02ab95ebb
This bug was caused by the following two changes: iscsi: Remove duplication of the variable for write completion to bdev https://review.gerrithub.io/#/c/393582/ iscsi: restore data_transferred accumulation for read https://review.gerrithub.io/#/c/393713/ For write, bytes_completed is always equal to data_transferred. However, for read, bytes_completed is based on expected data transfer length and data_transferred is actual read size. Hence bytes_completed cannot be used to calculate residual counts. One of the reason why this bug cannot be found was that there was not any test case when task->scsi.data_transferred is 0 and task->scsi.length is not 0. Hence UT code is also added. Same bug will occur for read sense data. Hence UT code for read sense data is added in the next patch. Change-Id: Ib1a283b769e5af0c2d05acb69f90948c5d658087 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/417960 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> |
||
---|---|---|
.. | ||
acceptor.c | ||
acceptor.h | ||
conn.c | ||
conn.h | ||
init_grp.c | ||
init_grp.h | ||
iscsi_rpc.c | ||
iscsi_subsystem.c | ||
iscsi.c | ||
iscsi.h | ||
Makefile | ||
md5.c | ||
md5.h | ||
param.c | ||
param.h | ||
portal_grp.c | ||
portal_grp.h | ||
task.c | ||
task.h | ||
tgt_node.c | ||
tgt_node.h |