Spdk/test/unit/lib/iscsi
Shuhei Matsumoto 19eb63fcad lib/iscsi: Stop splitting immediately when aborting SCSI read I/O
We changed read I/O submission to stop splitting when detecting LUN
hotplug very recently. We can do the same refinement for read I/O
abortion.

In _iscsi_conn_abort_queued_datain_task(), set all remaining length
to the new task and complete it immediately. We keep the code to
process the case that queued_datain_task completed but is still in
queue, but we can change its if condition to assert.

Simplify the corresponding unit tests accordingly, and set
task->scsi.transfer_len in abort_queued_datain_tasks_test() to
exercise the changed paths.

In iscsi_pdu_payload_po_scsi_read(), if task->scsi.transfer_len is not
larger than SPDK_BDEV_LARGE_BUF_MAX_SIZE, no minimum calculation is
necessary and we can substitute task->scsi.transfer_len to
task->scsi.length simply.  This change is too small to be an independent
patch and is done together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iea93e51b103eae141a007a0abdaf13cbe6d5287f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476984
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-12 14:41:41 +00:00
..
conn.c lib/iscsi: Simplify iscsi_conn_free_tasks() 2019-12-05 12:21:09 +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/iscsi: Stop splitting immediately when aborting SCSI read I/O 2019-12-12 14:41:41 +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 lib/iscsi: Remove the code for the deprecated CPU mask 2019-12-06 14:50:43 +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 iscsi: put data_cnt_in operation in iscsi task get and free 2019-12-04 15:34:54 +00:00
Makefile iscsi&iscsi/ut: Unify cpumask decode between iSCSI.conf and JSON-RPC 2018-01-19 15:47:57 -05:00