39bdb45ed8
We had not decremented conn->data_in_cnt when the primary is removed from conn->queued_datain_tasks after submitting it. If we simply add decrement into iscsi_conn_free_tasks() and _iscsi_conn_remove_lun(), it conflicts with iscsi_transfer_in(). By recent refinements, primary is freed in either spdk_iscsi_conn_free_pdu() or iscsi_conn_free_tasks()/_iscsi_conn_remove_lun(). Hence let's make decrement of conn->data_in_cnt for primary follow the management of primary. In iscsi_conn_free_tasks()/_iscsi_conn_remove_lun(), if primary->current_datain_offset, conn->data_in_cnt is incremented, and hence decrement it. In spdk_iscsi_conn_free_pdu(), if primary and all subtasks are completed, decrement conn->data_in_cnt. This patch will fix the issue that conn->data_in_cnt ls still positive even after all tasks are freed when removing LUN dynamically. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I70cb431ab968387749ff7a5c77cd109904687797 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474436 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com> |
||
---|---|---|
.. | ||
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 |