cd654cc512
Previously iSCSI task was created after allocating data buffer and reading all data, and hence creating iSCSI task and processing iSCSI task were not separated. However, the recent refactoring separate PDU header handling and PDU payload handling, and then inserted allocating data buffer and reading data segment in the middle. If any critical error occurs during allocating data buffer or reading data segment, PDU payload handling is not done, and hence created iSCSI task is left in PDU receive process. If any critical error occurs, the current connection starts exiting and there is no way to continue PDU receive process. The task left in PDU receive process is never freed, and hence LUN hotplug or exiting connection never complete. This patch do the following: - Consolidate freeing pre-allocated PDU to spdk_iscsi_conn_destruct() because this is the only path to exit connection. - Abort SCSI task of the task left in PDU receive process if found when freeing pre-allocated PDU. If the task is not SCSI or Data Out, remove it simply. Fix issues #1018. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I8a2464c446c43bf4cfb5afbc0cd78b5bdef7d080 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472896 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@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 |