diff mbox

[v2,10/36] target: Rename tmr_wq into alua_wq

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

Commit Message

Bart Van Assche Feb. 2, 2017, 12:58 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>
---
 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(-)

Comments

Christoph Hellwig Feb. 6, 2017, 9:08 a.m. UTC | #1
On Wed, Feb 01, 2017 at 04:58:27PM -0800, Bart Van Assche wrote:
> 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>

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
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 9d55e9fe7857..5431c51a70be 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -899,11 +899,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;
 	}
@@ -954,7 +954,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 f6e5fb22f338..5cb7583ad701 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -793,7 +793,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;