From patchwork Wed Feb 8 22:24:38 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: 9563687 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 AE35C6020F for ; Wed, 8 Feb 2017 22:29:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 811ED284F2 for ; Wed, 8 Feb 2017 22:29:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 75FDF2852C; Wed, 8 Feb 2017 22:29:51 +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 16EA9284F2 for ; Wed, 8 Feb 2017 22:29:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751301AbdBHW3u (ORCPT ); Wed, 8 Feb 2017 17:29:50 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:11128 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751092AbdBHW3u (ORCPT ); Wed, 8 Feb 2017 17:29:50 -0500 X-IronPort-AV: E=Sophos;i="5.35,348,1483977600"; d="scan'208";a="76618127" Received: from unknown (HELO milsmgep15.sandisk.com) ([63.163.107.21]) by ob1.hgst.iphmx.com with ESMTP; 09 Feb 2017 06:28:17 +0800 Received: from MILHUBIP03.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 03.54.57638.8CA9B985; Wed, 8 Feb 2017 14:25:13 -0800 (PST) Received: from milsmgip12.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Wed, 8 Feb 2017 14:25:11 -0800 X-AuditID: 0ac94369-26dee9800001e126-f0-589b9ac879bd Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id FF.32.18148.7CA9B985; Wed, 8 Feb 2017 14:25:11 -0800 (PST) From: Bart Van Assche To: Bart Van Assche CC: , Hannes Reinecke , David Disseldorp Subject: [PATCH v4 08/37] target: Rename tmr_wq into alua_wq Date: Wed, 8 Feb 2017 14:24:38 -0800 Message-ID: <20170208222507.25715-9-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170208222507.25715-1-bart.vanassche@sandisk.com> References: <20170208222507.25715-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNLMWRmVeSWpSXmKPExsXCddJ5ke7JWbMjDC7sYrb4+n86i8WCN3vZ LFqXvmVyYPZYv+Uqi8fm09UenzfJBTBHcdmkpOZklqUW6dslcGWcef+dvWC9RMWye19ZGxiv inQxcnJICJhIHHxwirWLkYtDSGApk8Ts/tUsEM52Ronlk7Yxw1Q1vJrIDpHYyCix5+oRRpAE m4CRxLf3M1lAbBEBA4nfvRfA4swC6RIbdveyg9jCAjYSnQ0fgOIcHCwCKhLLexNAwrwC9hKt 66axQcyXl9jVdpEVxOYUcJCY8PIZ2BghoJpXB74wguyVEPjEIrF35S5miGZBiZMzn7BA7JKQ OPjiBTNEg7rEySXzmSYwCs1CUjYLSdkCRqZVjGK5mTnFuempBYamesWJeSmZxdl6yfm5mxgh QZy5g/HuE+9DjAIcjEo8vBWWsyOEWBPLiitzDzFKcDArifCmTAMK8aYkVlalFuXHF5XmpBYf YpTmYFES5z0nMzVCSCA9sSQ1OzW1ILUIJsvEwSnVwCgs5HExJ+JIMaeU9NPbvy7479/o/+Pw lLzdOg+tArYveqwkx3wpSD4iZe2c6TcCl7q2uvW8tmqs8ystUXrE9F2f4cfJQwePvCz7Kzbl dqaN6UnVt7u/ppSe+PJiq5RNikQh582a2xc+RG589Fbr74Fi3eDejw0THr8WlFC6n/bt6M8b ye9q/wUrsRRnJBpqMRcVJwIAzVEQi14CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJJMWRmVeSWpSXmKPExsXCtZGTTff4rNkRBl9nK1gc/NnGaPH1/3QW iwVv9rJZtC59y+TA4jFtzXkmj/VbrrJ4bD5d7fF5k1wASxSXTUpqTmZZapG+XQJXxpn339kL 1ktULLv3lbWB8apIFyMnh4SAiUTDq4nsILaQwHpGieO3akFsNgEjiW/vZ7KA2CICBhK/ey8w gtjMAukSz2bfYQKxhQVsJDobPgDFOThYBFQlzt2xBwnzCthLtJ6+wgQxXl5iV9tFVhCbU8BB YsLLZ4wQq+wlXh34wjiBkXsBI8MqRrHczJzi3PTMAkMjveLEvJTM4my95PzcTYwQz0ftYLw+ 0fwQIxMHp1QD4/pz90zYNWpNWpcGmXe9FGFbIs/+Uz+4ScxfoEXa0uJCtfZtoagjK75Nnbrn WXHELe1La0Niv+S57SjWjT7QEByuftt8SfTf2NqYy746fKFrNWpPXQrbobma22q5ztbN8wUn 6povdrxpzKr95cfS0imZx/YkibQcClFcarWD8emkKyul/uZYKrEUZyQaajEXFScCAI11vx6s AQAA 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 Reviewed-by: Hannes Reinecke --- 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 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;