From patchwork Sat Oct 29 00:23:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9402957 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 3141F6022E for ; Sat, 29 Oct 2016 00:23:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F0D02A8A8 for ; Sat, 29 Oct 2016 00:23:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 127D82A8BB; Sat, 29 Oct 2016 00:23: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=-5.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,URIBL_BLACK autolearn=unavailable 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 96FB62A8A8 for ; Sat, 29 Oct 2016 00:23:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965118AbcJ2AXt (ORCPT ); Fri, 28 Oct 2016 20:23:49 -0400 Received: from mail-dm3nam03on0065.outbound.protection.outlook.com ([104.47.41.65]:59539 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S938815AbcJ2AXq (ORCPT ); Fri, 28 Oct 2016 20:23:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=g7LLjrK5tfgH+TDr9syK8Th+pI9a79j7vN7aR1fvF6I=; b=FS0/fX++6Vp4dXE7uqiOirP6qxUbgzME05y5m2QmFcqsa5J1bKIA6/LtVsSzjupDy3IbZ8AN67bQVsTOQLi7aHNMIZ+l+atLCkATz2Zdaw6V/+K+Tfyk8UWcCjs1+B2Sq62jxglWuvZKTF5IRTqqhMPYaCE7747Mn1LhD9VnMA4= Received: from BY2PR02CA0087.namprd02.prod.outlook.com (10.242.32.45) by BLUPR02MB1154.namprd02.prod.outlook.com (10.163.79.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12; Sat, 29 Oct 2016 00:23:43 +0000 Received: from BL2FFO11FD025.protection.gbl (2a01:111:f400:7c09::150) by BY2PR02CA0087.outlook.office365.com (2a01:111:e400:2c2a::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12 via Frontend Transport; Sat, 29 Oct 2016 00:23:42 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by BL2FFO11FD025.mail.protection.outlook.com (10.173.161.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.5 via Frontend Transport; Sat, 29 Oct 2016 00:23:41 +0000 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 BE.B0.61581.9B9E3185; Fri, 28 Oct 2016 17:13:45 -0700 (PDT) Received: from milsmgip12.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; Fri, 28 Oct 2016 17:23:40 -0700 X-AuditID: 0ac94371-607ff7000000f08d-2f-5813e9b908e4 Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id F0.5B.03615.C0CE3185; Fri, 28 Oct 2016 17:23:40 -0700 (PDT) Subject: [PATCH v5 14/14] nvme: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code To: Jens Axboe References: <7460e8b2-2cfd-c0d5-7ae7-7f662d89dad3@sandisk.com> CC: Christoph Hellwig , James Bottomley , "Martin K. Petersen" , Mike Snitzer , Doug Ledford , Keith Busch , Ming Lei , "Konrad Rzeszutek Wilk" , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Laurence Oberman , "linux-block@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "linux-nvme@lists.infradead.org" From: Bart Van Assche Message-ID: Date: Fri, 28 Oct 2016 17:23:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <7460e8b2-2cfd-c0d5-7ae7-7f662d89dad3@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsXCddJ5ke7Ol8IRBh/eS1n833OMzeLl+Q+s FitXH2WyWDUxz+Le0S9MFssWP2W02HtL22L+sqfsFs8O9bJYdF/fwWZx/sMrJovlx/8xWcw4 v5jVom3jV0aL9z+uszvwe7yePIHRY2LzO3aPnbPusnss3vOSyePBoc0sHpuX1HvsvtnA5vHx 6S0Wj/f7rrJ5fN4kF8AVxWWTkpqTWZZapG+XwJWx798GxoK1ghVNBz8wNzC283cxcnBICJhI 9G1z62Lk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BGXLS2x/O4d5AiPfLCQts5CUzUJStoCReRWjWG5mTnFuemaBoZFe cWJeSmZxtl5yfu4mRnDEcEbtYLw+0fwQIxMHp1QD4/aeS8XPZjcn635+tYV/YrtLcubO57I1 5XFL9V8cmPly1a3os52PA1e+OFg3p+TA/qgbkR6GBzmu63A/CDxuc/DVownNuj7Cq1c9+Rz5 7czzgxPM8rPWiFqvmOTyepFP2rpF3tE7NSMsOtvFzf+mF5oY/7Ll0ZZhP3Bhv0F79d1k/7mf dksJRSqxFGckGmoxFxUnAgCL89jhSAIAAA== X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(189002)(199003)(2950100002)(110136003)(8936002)(6916009)(31686004)(19580395003)(65826007)(7416002)(87936001)(19580405001)(11100500001)(106466001)(64126003)(230700001)(53416004)(83506001)(626004)(5660300001)(97736004)(189998001)(2906002)(4001350100001)(77096005)(2270400002)(36756003)(31696002)(81166006)(86362001)(81156014)(69596002)(92566002)(50466002)(4326007)(8676002)(33646002)(54356999)(65956001)(305945005)(50986999)(229853001)(65806001)(76176999)(47776003)(8666005)(7846002)(356003)(586003)(23676002)(68736007)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR02MB1154; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD025; 1:3NdkCRf7YafEIKjxNv1N0uUUuj4IyrHhZqRDtmqSkgSB5WfKkvnVQwN3i6CwktjciKxYfCspL75FxaTH+HG1mk8dj2PHB/1/dxeoSeve7t/Z16FbPhrupX4dsGh0xJGjAlJ9RxKS9lqjSGao5xjDa6tDanG4VcaDq2Hj/jWb3xbyIecE7wPtXxz2ZD9d8zR8nU0ozNqkbWygYaQoIrMYvuJ0x/Q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B6lnaTdmdXEBPKaXdnA4+jA8YRo/Fujo9OzwFMpZagkVLDn6zrBUu/YI9mTS4tqCsOZePLyn5sxqGZVFXiC26dk5lHuJuGWfwp0Z7smNLcIe99b4dSsd5IjokGsXw//hCnhuQsRzho2koAyPpYJaTL19xt9tE9gL4zdF/ve X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(13016025)(5005006)(13018025)(3002001)(10201501046)(6055026); SRVR:BLUPR02MB1154; BCL:0; PCL:0; RULEID:; SRVR:BLUPR02MB1154; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB1154; 4:lkKLP0aUAOVHtIp834qWhGmC8E2vhBShzOqgDX3/FAyg69Sxd3Wrov0abr4gd0oj/+sYZ+UStLP2d7e4ou/ApauHId2FI5zvE7n2Wn2E3ccyaIqziMEfJ8KOMPTBcXhhHZdkvbFJamnqd18k9qYGHd9Wbw5k18NhJbVo3ptnrBDV3JOf0T+J3RO7QCHcILaRWo1CUJZzGknYisyfwD43IDTgFX3JE9yo+YwZOAe0ls9IDa6doA27g8M50bxbTkxekpjI4Tz444mgDIN7UFjilcuY4QPBldQ5VJJ1AYGa9HJ5ngc+tB43Z/Hl5yr5C08YJkrRjMW2ZvLZv8wpQ6wQx54TIXZ1iFBWdMQDcSD6U6PkN3OQS0cYSfPQGQ2yGIWs9OHgDvRPwIFbWJIRAei5pmGrIbcpNEnOOWDoFydSerr7bu1/lmixpVFSqXamAlHpxnbOyM5Z227ZhBIXrm2mQj9Ky2nAoUQX4ugBP67plb4gVE9BTpTvJEMuJR4KLVXEo6ReSiSTwnlhuMJ+MU6Kaw5y3sHviQmxk/gdu9mq7zo= X-Forefront-PRVS: 01106E96F6 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTFVQUjAyTUIxMTU0OzIzOnNSWG81LzQwbDY1Z3I0aW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81X36b7+hPoo1oZR2MmLZkAVce8eB6DN45EGU+bWOFt3Rv69QZGYG3v9yUgWSxTXt2+epSJGe5TPoFWwLLEsad1vfLMLeSLA9BE1jbjHCcOnRKd/yxZnddTNTjfdxrjQ2bUCwSfduLbfwIWCZBh5GKFZUpohpEna9sORHhaQBO15fIocAxN7v7qcVBaZD90dlluIuYCbTbbdJ76kgk4I/nQimFg8+8teSwbMOJHZbrPqKxP2oQAF7t8oeHRbg X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2016 00:23:41.3075 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR02MB1154 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make nvme_requeue_req() check BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED. Remove the QUEUE_FLAG_STOPPED manipulations that became superfluous because of this change. Change blk_queue_stopped() tests into blk_mq_queue_stopped(). This patch fixes a race condition: using queue_flag_clear_unlocked() is not safe if any other function that manipulates the queue flags can be called concurrently, e.g. blk_cleanup_queue(). Signed-off-by: Bart Van Assche Cc: Keith Busch Cc: Christoph Hellwig Cc: Sagi Grimberg --- drivers/nvme/host/core.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index fe15d94..45dd237 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -201,13 +201,7 @@ static struct nvme_ns *nvme_get_ns_from_disk(struct gendisk *disk) void nvme_requeue_req(struct request *req) { - unsigned long flags; - - blk_mq_requeue_request(req, false); - spin_lock_irqsave(req->q->queue_lock, flags); - if (!blk_queue_stopped(req->q)) - blk_mq_kick_requeue_list(req->q); - spin_unlock_irqrestore(req->q->queue_lock, flags); + blk_mq_requeue_request(req, !blk_mq_queue_stopped(req->q)); } EXPORT_SYMBOL_GPL(nvme_requeue_req); @@ -2078,13 +2072,8 @@ void nvme_stop_queues(struct nvme_ctrl *ctrl) struct nvme_ns *ns; mutex_lock(&ctrl->namespaces_mutex); - list_for_each_entry(ns, &ctrl->namespaces, list) { - spin_lock_irq(ns->queue->queue_lock); - queue_flag_set(QUEUE_FLAG_STOPPED, ns->queue); - spin_unlock_irq(ns->queue->queue_lock); - + list_for_each_entry(ns, &ctrl->namespaces, list) blk_mq_quiesce_queue(ns->queue); - } mutex_unlock(&ctrl->namespaces_mutex); } EXPORT_SYMBOL_GPL(nvme_stop_queues); @@ -2095,7 +2084,6 @@ void nvme_start_queues(struct nvme_ctrl *ctrl) mutex_lock(&ctrl->namespaces_mutex); list_for_each_entry(ns, &ctrl->namespaces, list) { - queue_flag_clear_unlocked(QUEUE_FLAG_STOPPED, ns->queue); blk_mq_start_stopped_hw_queues(ns->queue, true); blk_mq_kick_requeue_list(ns->queue); }