Spdk/lib/iscsi
Shuhei Matsumoto 64a268e2e1 iscsi: Fix double dequeue of the primary write task in error handling
By running random, 64KB, 70% write, and 30% read workload and periodical
TCP disconnection from the initiator, segmentation fault have occurred.

By investigation, when the last write task completed and dequeued
the primary write task in spdk_iscsi_task_cpl(), the primary write task
was already dequeued in spdk_clear_all_transfer_task().

This patch dequeues all primary write tasks after all outstanding
tasks complete.

After starting to exit the connection, the connection will not receive
any command. Hence waiting for completion of all pending tasks first will
avoid double dequeue safely.

Change-Id: I8e2b6b756be3a6e096675acc81cdb93fb6a7e350
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/430397
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-10-23 17:58:52 +00:00
..
acceptor.c thread: Replace #include of io_channel.h with thread.h 2018-06-12 15:24:07 +00:00
acceptor.h iscsi: login poller per portal and portal cache 2017-10-06 17:00:45 -04:00
conn.c iscsi: Fix double dequeue of the primary write task in error handling 2018-10-23 17:58:52 +00:00
conn.h iscsi: update iscsi trace config 2018-09-26 09:04:38 +00:00
init_grp.c iscsi: Add JSON config/info dump for initiator group. 2018-05-10 19:38:26 +00:00
init_grp.h iscsi: Add JSON config/info dump for initiator group. 2018-05-10 19:38:26 +00:00
iscsi_rpc.c iscsi&scripts/rpc: Add get_iscsi_auth_groups RPC to get current configuration 2018-08-29 21:40:31 +00:00
iscsi_subsystem.c iscsi: Fix the bug that mutual chap is not enabled by .ini config file 2018-09-11 21:59:44 +00:00
iscsi.c iscsi: add iscsi prefix in every tracepoint name 2018-09-19 17:22:44 +00:00
iscsi.h iscsi, nvmf, vhost: remove default config file pathnames 2018-09-05 19:46:17 +00:00
Makefile Make: Add deps for each shared obj individually 2018-10-09 21:45:26 +00:00
md5.c astyle: enforce braces around single-line statements 2017-12-11 11:19:32 -05:00
md5.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
param.c lib: fix typos in the lib directory 2018-08-24 17:15:12 +00:00
param.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
portal_grp.c iscsi: Fix two bugs of JSON config dump 2018-05-17 23:06:11 +00:00
portal_grp.h iscsi: Add JSON config/info dump for portal group. 2018-05-10 19:38:26 +00:00
task.c scsi, iscsi: move task->parent to iSCSI task 2018-01-05 00:01:37 -05:00
task.h iscsi: fix the primary iscsi task free in queued_datain_tasks 2018-08-15 17:35:38 +00:00
tgt_node.c iscsi: Add set_iscsi_target_node_auth RPC to configure CHAP dynamically 2018-08-22 22:39:26 +00:00
tgt_node.h iscsi: Add set_iscsi_target_node_auth RPC to configure CHAP dynamically 2018-08-22 22:39:26 +00:00