Spdk/test/unit/lib/iscsi
Shuhei Matsumoto e79a29b264 lib/iscsi: Make spdk_del_transfer_task() return success/failure
After recent refinement of LUN hotplug, it is possible that
for large write I/O, primary task is freed doubly as a github issue
is reported.

However we could not notice the case because spdk_del_transfer_task()
had not return success/failure, and to make matters worse,
the second call of TAILQ_REMOVE() to the same header and instance
caused no error if the first call succeeded.

This patch changes spdk_del_transfer_task() to return success/failure.

Besides, the next after patch expects the stub of spdk_del_transfer_task()
returns true in the unit test, and hence do that.

The next after patch will fix the issue of double free of primary task
by using this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibc0b65723050362d5fafa913417b64393feb874e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475042
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-11-21 08:01:29 +00:00
..
conn.c lib/iscsi: Make spdk_del_transfer_task() return success/failure 2019-11-21 08:01:29 +00:00
init_grp.c iscsi: Remove the prefix spdk_ from names of private functions 2019-04-01 00:52:56 +00:00
iscsi.c lib/scsi: Pass SCSI task to SCSI layer to get DIF context 2019-11-21 08:01:29 +00:00
param.c iscsi: Remove the prefix spdk_ from names of private functions 2019-04-01 00:52:56 +00:00
portal_grp.c rpc: Rename add_portal_group to iscsi_create_portal_group 2019-09-10 17:44:16 +00:00
tgt_node.c iscsi: Use not malloc'ed but fixed size string for portal porta number 2019-07-01 05:03:07 +00:00
common.c ut/iscsi: Unit test for PDU header handling 2019-11-18 12:51:38 +00:00
Makefile iscsi&iscsi/ut: Unify cpumask decode between iSCSI.conf and JSON-RPC 2018-01-19 15:47:57 -05:00