numam-spdk/lib/scsi
Shuhei Matsumoto 728972cdf3 scsi: Set TMF code prior to calling spdk_scsi_dev_queue_mgmt_task
By subsequent patches for iSCSI, spdk_scsi_dev_queue_mgmt_task()
will not be called directly from the function that knows TMF code,
and currently setting TMF code to SCSI task is done in
spdk_scsi_dev_queue_mgmt_task().

Hence after subsequent patches for iSCSI, to hand off TMF code to
SCSI task, any dynamic context will be required.

To avoid the dynamic context, extract setting TMF code from
spdk_scsi_dev_queue_mgmt_task() and put appropriate place for
each call of spdk_scsi_dev_queue_mgmt_task().

Additionally, in spdk_abort_transfer_task_in_task_mgmt_resp(),
ref_task_tag is got from PDU but getting it from SCSI task is
much easier. Hence get ref_task_tag from SCSI task in the callback.

Change-Id: I7add9290598d2df7cfcf1506ec75d74c70c0f236
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/436643
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-12-10 20:34:11 +00:00
..
dev.c scsi: Set TMF code prior to calling spdk_scsi_dev_queue_mgmt_task 2018-12-10 20:34:11 +00:00
lun.c scsi: Add scsi_task_process_abort for aborted SCSI tasks. 2018-12-10 20:34:11 +00:00
Makefile scsi: remove lun_db 2018-01-09 13:56:00 -05:00
port.c scsi: add iSCSI initiator port TransportID 2018-12-05 16:04:06 +00:00
scsi_bdev.c scsi: Differentiate callback function about LUN reset from other TMFs 2018-12-06 22:35:40 +00:00
scsi_internal.h scsi: LUN reset waits for completion of all prior tasks 2018-12-10 20:34:11 +00:00
scsi_rpc.c rpc: Add state_mask to each RPC method to make sets of RPCs 2018-05-03 19:48:15 +00:00
scsi.c lib/trace: show specific usage of trace mask 2018-11-30 14:52:28 +00:00
task.c scsi: Add scsi_task_process_abort for aborted SCSI tasks. 2018-12-10 20:34:11 +00:00