numam-spdk/lib
Shuhei Matsumoto cd654cc512 lib/iscsi: Remove iSCSI task left in PDU receive process due to connection exit
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>
2019-10-31 17:26:26 +00:00
..
bdev nvme: allow setting of completion queue CDW0 2019-10-24 18:02:38 +00:00
blob lib/blob: update buf and buf_sz when serializing extent_rle 2019-10-07 15:07:12 +00:00
blobfs blobfs: use __wake_caller() to wake up the caller 2019-08-14 21:41:36 +00:00
conf string: spdk_strtol to delegate additional error checking 2019-01-29 00:10:57 +00:00
copy lib/copy: move ioat subdir to module directory. 2019-08-22 16:29:49 +00:00
env_dpdk env_dpdk: modify error message when DPDK already initialized 2019-10-24 17:15:55 +00:00
env_ocf lib/bdev/ocf: update of ocf library to version 19.06 2019-10-22 17:22:41 +00:00
event reactor: allow spdk_reactors_fini() to be called without prior init 2019-10-09 14:29:22 +00:00
ftl lib/ftl: Make ANM device unregister asynchronous 2019-10-01 14:47:50 +00:00
ioat ioat: allocate device struct using regular calloc 2019-04-09 06:30:42 +00:00
iscsi lib/iscsi: Remove iSCSI task left in PDU receive process due to connection exit 2019-10-31 17:26:26 +00:00
json json_util: fix typo in debug message. 2019-05-31 14:39:53 +00:00
jsonrpc jsonrpc: tolerate null json value for parameters in json-rpc call 2019-07-26 19:30:57 +00:00
log lib/log: passing va_list to user-provided log call 2019-10-09 14:35:51 +00:00
log_rpc RPC: rename get_log_flags to log_get_flags 2019-09-24 16:42:41 +00:00
lvol lvol: Remove blobstore on super blob creation/open error 2019-09-09 21:56:47 +00:00
nbd rpc: Rename get_nbd_disks to nbd_get_disks 2019-09-19 20:56:35 +00:00
net log: remove old-style errlog entries. 2019-09-26 16:15:11 +00:00
notify RPC: rename get_notifications to notify_get_notifications 2019-09-24 16:42:41 +00:00
nvme nvme/cuse: Poll the io_msg queue when the admin queue is polled 2019-10-31 14:05:23 +00:00
nvmf nvme: allow setting of completion queue CDW0 2019-10-24 18:02:38 +00:00
reduce lib/reduce: enable deletion of a vol w/o a pmem file 2019-08-22 04:31:46 +00:00
rocksdb RocksDB: Remove static and assert for SpdkInitializeThread 2019-07-05 04:19:11 +00:00
rpc rpc: Rename get_spdk_version to spdk_get_version 2019-09-26 15:20:46 +00:00
rte_vhost make: add dependencies for the rte_vhost build. 2019-09-09 22:15:24 +00:00
scsi lib/scsi: Free bdev_io just after getting completion from bdev for management I/O 2019-10-22 17:20:51 +00:00
sock sock/posix: Store pointer to group in sock 2019-10-15 16:35:09 +00:00
thread log: remove old-style errlog entries. 2019-09-26 16:15:11 +00:00
trace rpc: Rename get_tpoint_group_mask trace_get_tpoint_group_mask 2019-10-01 13:59:37 +00:00
ut_mock test: Add a mock for writev 2019-10-08 15:48:29 +00:00
util util: optimize base64 with Arm NEON 2019-09-24 17:03:36 +00:00
vhost nvme: allow setting of completion queue CDW0 2019-10-24 18:02:38 +00:00
virtio lib/virtio: change the definition of cookie 2019-06-26 08:03:37 +00:00
vmd lib/vmd: make sure pcie_cap is not NULL before dereferencing it 2019-10-28 17:18:54 +00:00
Makefile make: add dependencies for the rte_vhost build. 2019-09-09 22:15:24 +00:00