From patchwork Wed Feb 15 00:25:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9573081 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 74BC2600F6 for ; Wed, 15 Feb 2017 00:26:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67EF828418 for ; Wed, 15 Feb 2017 00:26:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5CDD22842E; Wed, 15 Feb 2017 00:26:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8A6F28418 for ; Wed, 15 Feb 2017 00:26:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750791AbdBOA0o (ORCPT ); Tue, 14 Feb 2017 19:26:44 -0500 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:10895 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751210AbdBOA0m (ORCPT ); Tue, 14 Feb 2017 19:26:42 -0500 X-IronPort-AV: E=Sophos;i="5.33,348,1477929600"; d="scan'208";a="86867829" Received: from unknown (HELO milsmgep15.sandisk.com) ([63.163.107.21]) by ob1.hgst.iphmx.com with ESMTP; 15 Feb 2017 08:26:20 +0800 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id BA.E4.57638.B20A3A85; Tue, 14 Feb 2017 16:26:20 -0800 (PST) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Tue, 14 Feb 2017 16:26:15 -0800 X-AuditID: 0ac94369-26dee9800001e126-72-58a3a02c562e Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id D9.7D.11415.720A3A85; Tue, 14 Feb 2017 16:26:15 -0800 (PST) From: Bart Van Assche To: "Nicholas A . Bellinger" CC: , Bart Van Assche , Hannes Reinecke , David Disseldorp Subject: [PATCH v6 08/33] target: Rename tmr_wq into alua_wq Date: Tue, 14 Feb 2017 16:25:47 -0800 Message-ID: <20170215002612.14566-9-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170215002612.14566-1-bart.vanassche@sandisk.com> References: <20170215002612.14566-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCLMWRmVeSWpSXmKPExsXCddJ5ka7OgsURBk2veC2+/p/OYrHgzV42 i7bVZxgtWpe+ZXJg8bi//QiTx/otV1k8Np+u9vi8SS6AJYrLJiU1J7MstUjfLoEr49ye6UwF 6yUqLp9dytbAeFWki5GTQ0LARGJ2z2nWLkYuDiGBpUwSW9fPZIdwdjBK9C/sZOxi5ACr+rVH ByK+kVFidsM0RpBuNgEjiW/vZ7KA2CJA9uqeZUwgRcwC0xklNrdvYgVJCAvYSBxcMJ0JxGYR UJV4feE9M4jNK2AvcX7PdUaIM+QldrVdBKvnFHCQmLHjJAvIYiGgmkdnrCFKulglVq/ggWgV lDg58wnYXmYBCYmDL16AjRQSUJc4uWQ+0wRGoVlIymYhKVvAyLSKUSw3M6c4Nz21wNBUrzgx LyWzOFsvOT93EyMkrDN3MN594n2IUYCDUYmH94Ts4ggh1sSy4srcQ4wSHMxKIrxs9UAh3pTE yqrUovz4otKc1OJDjNIcLErivOdkpkYICaQnlqRmp6YWpBbBZJk4OKUaGFf+TNYvWGBymO+V 6Apdc4281Rff+a3etrZn6sLwdT7nt9pVzEkrZdkanNNlrut3tvIfP6NB5UqVN6+v3Hcp1br4 xcY6c8LGsoCDZ/5tf2IcrhW3SPhZbV7m1uXawR0MEq112fx3HET+B3/d/7EkfsHVBTxpkrUf DmY3WniWPX0r6bvYl3fzHyWW4oxEQy3mouJEACSY3jpnAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCJMWRmVeSWpSXmKPExsXCtZGTTVd9weIIg/cNQhYHf7YxWnz9P53F YsGbvWwWbavPMFq0Ln3L5MDqcX/7ESaPaWvOM3ms33KVxWPz6WqPz5vkAlijuGxSUnMyy1KL 9O0SuDLO7ZnOVLBeouLy2aVsDYxXRboYOTgkBEwkfu3R6WLk4hASWM8o8WPrG/YuRk4ONgEj iW/vZ7KA2CJA9uqeZUwgRcwC0xklTp3dAZYQFrCROLhgOhOIzSKgKvH6wntmEJtXwF6isb+V EcSWEJCX2NV2kRXE5hRwkJix4yQLyGIhoJpHZ6wnMHIvYGRYxSiWm5lTnJueWWBoqFecmJeS WZytl5yfu4kREg6ROxifTjQ/xMjEwSnVwMh1Raeod8fi7H9Tnxw8cryu2eP2k3l832/Jq1c7 zwn4O+dI8CnudTuEHfRcfh49tpDxim5BMaPcx9R/IqFpS1/Yy+s2Xdu4veD1t88+m5delk9V T+LbwKq0anlM6BVDKbXax44Rqne9k2fKMdY/PL/rU0htj65owbEP9YK/2nZ0mmRs7px1wU2J pTgj0VCLuag4EQCsjV4DtwEAAA== MIME-Version: 1.0 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Christoph Hellwig Cc: Hannes Reinecke Cc: David Disseldorp --- 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 --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;