diff mbox

[v6,08/33] target: Rename tmr_wq into alua_wq

Message ID 20170215002612.14566-9-bart.vanassche@sandisk.com (mailing list archive)
State Superseded
Headers show

Commit Message

Bart Van Assche Feb. 15, 2017, 12:25 a.m. UTC
Rename tmr_wq now that it is used for ALUA processing only.
Additionally, drop the WQ_MEM_RECLAIM flag since ALUA work is never
queued from inside the memory reclaim path.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.com>
Cc: David Disseldorp <ddiss@suse.de>
---
 drivers/target/target_core_alua.c   |  4 ++--
 drivers/target/target_core_device.c | 12 ++++++------
 include/target/target_core_base.h   |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c
index f5e330099bfc..851ec74bc6f2 100644
--- a/drivers/target/target_core_alua.c
+++ b/drivers/target/target_core_alua.c
@@ -1121,12 +1121,12 @@  static int core_alua_do_transition_tg_pt(
 		unsigned long transition_tmo;
 
 		transition_tmo = tg_pt_gp->tg_pt_gp_implicit_trans_secs * HZ;
-		queue_delayed_work(tg_pt_gp->tg_pt_gp_dev->tmr_wq,
+		queue_delayed_work(tg_pt_gp->tg_pt_gp_dev->alua_wq,
 				   &tg_pt_gp->tg_pt_gp_transition_work,
 				   transition_tmo);
 	} else {
 		tg_pt_gp->tg_pt_gp_transition_complete = &wait;
-		queue_delayed_work(tg_pt_gp->tg_pt_gp_dev->tmr_wq,
+		queue_delayed_work(tg_pt_gp->tg_pt_gp_dev->alua_wq,
 				   &tg_pt_gp->tg_pt_gp_transition_work, 0);
 		wait_for_completion(&wait);
 		tg_pt_gp->tg_pt_gp_transition_complete = NULL;
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index cb7047d66afc..e62edd4bbae3 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -907,11 +907,11 @@  int target_configure_device(struct se_device *dev)
 	/*
 	 * 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);
+	dev->alua_wq = alloc_workqueue("alua-%s", WQ_UNBOUND, 1,
+				       dev->transport->name);
+	if (!dev->alua_wq) {
+		pr_err("Unable to create ALUA workqueue for %s\n",
+		       dev->transport->name);
 		ret = -ENOMEM;
 		goto out_free_alua;
 	}
@@ -962,7 +962,7 @@  void target_free_device(struct se_device *dev)
 	WARN_ON(!list_empty(&dev->dev_sep_list));
 
 	if (dev->dev_flags & DF_CONFIGURED) {
-		destroy_workqueue(dev->tmr_wq);
+		destroy_workqueue(dev->alua_wq);
 
 		mutex_lock(&g_device_mutex);
 		list_del(&dev->g_dev_node);
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index d7336f3c6b60..12a339d6e288 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -791,7 +791,7 @@  struct se_device {
 	struct t10_pr_registration *dev_pr_res_holder;
 	struct list_head	dev_sep_list;
 	struct list_head	dev_tmr_list;
-	struct workqueue_struct *tmr_wq;
+	struct workqueue_struct *alua_wq;
 	struct work_struct	qf_work_queue;
 	struct list_head	delayed_cmd_list;
 	struct list_head	state_list;