diff options
author | Bart Van Assche <bvanassche@acm.org> | 2018-11-28 00:51:59 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-12-08 03:20:07 +0100 |
commit | db5b21a24e01d35495014076700efa02d6dcbb68 (patch) | |
tree | 4f292075ebba7d5f4e1ed85f692ec608809a1de5 /drivers/target/target_core_device.c | |
parent | scsi: target/core: Make sure that target_wait_for_sess_cmds() waits long enough (diff) | |
download | linux-db5b21a24e01d35495014076700efa02d6dcbb68.tar.xz linux-db5b21a24e01d35495014076700efa02d6dcbb68.zip |
scsi: target/core: Use system workqueues for TMF
A quote from SAM-5: "The order in which task management requests are
processed is not specified by the SCSI architecture model. The SCSI
architecture model does not require in-order delivery of such task
management requests or processing by the task manager in the order
received. To guarantee the processing order of task management requests
referencing sent to a specific logical unit, an application client should
not have more than one such task management request pending to that logical
unit." This means that it is safe to use the system workqueues instead of
tmr_wq for processing TMFs. An intended side effect of this patch is that
it enables concurrent processing of TMFs.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Mike Christie <mchristi@redhat.com>
Cc: David Disseldorp <ddiss@suse.de>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target/target_core_device.c')
-rw-r--r-- | drivers/target/target_core_device.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 1d51df2b3e77..15805dec697b 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -987,18 +987,6 @@ int target_configure_device(struct se_device *dev) goto out_destroy_device; /* - * Startup the struct se_device processing thread - */ - dev->tmr_wq = alloc_workqueue("tmr-%s", WQ_MEM_RECLAIM | WQ_UNBOUND, 1, - dev->transport->name); - if (!dev->tmr_wq) { - pr_err("Unable to create tmr workqueue for %s\n", - dev->transport->name); - ret = -ENOMEM; - goto out_free_alua; - } - - /* * Setup work_queue for QUEUE_FULL */ INIT_WORK(&dev->qf_work_queue, target_qf_do_work); @@ -1026,8 +1014,6 @@ int target_configure_device(struct se_device *dev) return 0; -out_free_alua: - core_alua_free_lu_gp_mem(dev); out_destroy_device: dev->transport->destroy_device(dev); out_free_index: @@ -1046,8 +1032,6 @@ void target_free_device(struct se_device *dev) WARN_ON(!list_empty(&dev->dev_sep_list)); if (target_dev_configured(dev)) { - destroy_workqueue(dev->tmr_wq); - dev->transport->destroy_device(dev); mutex_lock(&device_mutex); |