Spdk/include/spdk
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
..
assert.h include: move standard includes into spdk/stdinc.h 2017-05-08 10:11:01 -07:00
barrier.h barrier.h: fix load fence on armv8 2018-11-02 19:15:56 +00:00
base64.h util/base64: add base64 lib and unit tests 2018-07-19 00:50:54 +00:00
bdev_module.h bdev/part: use spdk_bdev_part_base instead of spdk_bdev as an API param 2018-11-28 22:51:30 +00:00
bdev.h QoS/Bdev: add the QoS related structure and enumeration 2018-10-02 22:10:13 +00:00
bit_array.h bit_array: return UINT32_MAX if no cleared bits found 2018-10-08 17:03:33 +00:00
blob_bdev.h bdev: rename spdk_bdev_module_if -> spdk_bdev_module 2018-03-13 00:55:12 -04:00
blob.h blobstore: Introduce io_unit size to blobstore. 2018-09-14 22:46:27 +00:00
blobfs.h blobfs: add a new API to return file's unique ID 2018-08-29 16:29:22 +00:00
conf.h include/conf: add comments for public APIs 2018-02-26 11:59:09 -05:00
copy_engine.h include/copy_engine.h: add comments for callback functions 2018-05-28 01:45:03 +00:00
cpuset.h doc: fix a bunch of parameter-related Doxygen comments 2018-06-19 17:29:06 +00:00
crc16.h util/crc16: add crc16 library support and unit tests 2017-12-20 15:12:26 -05:00
crc32.h Clean up some incorrect Copyright statements 2018-07-30 16:29:38 +00:00
endian.h include: move standard includes into spdk/stdinc.h 2017-05-08 10:11:01 -07:00
env.h pci: remove virtio-specific attach functions 2018-12-07 17:24:19 +00:00
event.h lib/trace: set num-trace-entries by app param 2018-11-26 18:34:18 +00:00
fd.h include/fd.h: add comments for pubclic APIs 2018-01-04 12:12:10 -05:00
gpt_spec.h bdev/gpt: dump partition name 2017-07-12 18:12:52 -04:00
histogram_data.h histograms: add function to merge histograms 2018-11-15 23:03:26 +00:00
io_channel.h thread: Rename io_channel.h to thread.h 2018-06-12 15:24:07 +00:00
ioat_spec.h ioat: clear the internal channel error register on reset 2018-08-13 16:59:18 +00:00
ioat.h ioat: change return type of spdk_ioat_detach() to be void 2018-09-11 21:16:48 +00:00
iscsi_spec.h iscsi: fix layout of logout request reason field 2017-09-22 16:11:11 -04:00
json.h json: add utilities function enabling itaration over JSON object 2018-10-18 16:07:37 +00:00
jsonrpc.h jsonrpc client: non-blocking mode 2018-12-07 09:41:03 +00:00
likely.h include: move standard includes into spdk/stdinc.h 2017-05-08 10:11:01 -07:00
log.h log: remove "trace" from public API 2018-12-03 19:50:15 +00:00
lvol.h lvol: destroy_lvol_bdev implementation 2018-07-25 17:06:45 +00:00
mmio.h mmio: add functions for 1 and 2 byte I/O accesses 2017-10-13 10:46:00 -04:00
nbd.h nbd: Make spdk_nbd_start asynchronous 2018-11-21 21:12:06 +00:00
net.h net: add asynchronous initialization and finish 2018-11-07 17:08:27 +00:00
nvme_intel.h include: move standard includes into spdk/stdinc.h 2017-05-08 10:11:01 -07:00
nvme_ocssd_spec.h ocssd: add chunk notification log struct 2018-09-27 01:30:45 +00:00
nvme_ocssd.h ocssd: add chunk notification log struct 2018-09-27 01:30:45 +00:00
nvme_spec.h nvme: Add the NVMe over fabrics TCP/IP transport support 2018-11-19 20:36:05 +00:00
nvme.h nvme_tcp: Make the header and data digest configurable. 2018-12-07 23:24:12 +00:00
nvmf_fc_spec.h nvmf: FC-NVMe spec. header file 2018-07-06 22:49:20 +00:00
nvmf_spec.h nvme: Add the NVMe over fabrics TCP/IP transport support 2018-11-19 20:36:05 +00:00
nvmf.h nvmf: remove tgt_opts from nvmf_tgt 2018-11-08 23:08:26 +00:00
pci_ids.h nvme: add chk_rdy quirk for some Samsung drives 2018-07-14 01:47:47 +00:00
queue_extras.h scripts/check_format: check for spaces before tabs 2018-03-05 11:09:13 -05:00
queue.h Add extern "C" wrapper to all public headers 2016-02-12 07:52:35 -07:00
reduce.h reduce: add logical block size to vol params 2018-12-03 20:34:11 +00:00
rpc.h rpc: add spdk_rpc_is_method_allowed 2018-12-05 00:35:35 +00:00
scsi_spec.h scsi: add iSCSI initiator port TransportID 2018-12-05 16:04:06 +00:00
scsi.h scsi: Set TMF code prior to calling spdk_scsi_dev_queue_mgmt_task 2018-12-10 20:34:11 +00:00
sock.h sock: Update the spdk_sock_getaddr function. 2018-10-11 04:58:49 +00:00
stdinc.h app: allow full-name command line options 2018-08-13 17:30:10 +00:00
string.h util: make spdk_parse_ip_addr return -EINVAL instead -1 2018-10-12 23:34:27 +00:00
thread.h thread: Message passing now handled internally within a thread 2018-11-15 18:17:34 +00:00
trace.h lib/trace: show specific usage of trace mask 2018-11-30 14:52:28 +00:00
util.h fio_plugin: adjust polling timeout 2018-12-03 20:27:57 +00:00
uuid.h util/uuid: add a new uuid copy API. 2018-12-06 22:25:09 +00:00
version.h version: fix version string 2018-11-02 18:37:28 +00:00
vhost.h vhost/scsi: do not fail scsi_dev_add_tgt() if hotplug is not supported 2018-07-05 01:51:22 +00:00