From patchwork Tue Oct 18 21:53:11 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: 9383157 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 DA7AF600CA for ; Tue, 18 Oct 2016 21:53:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBEB02881F for ; Tue, 18 Oct 2016 21:53:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0DA229773; Tue, 18 Oct 2016 21:53:19 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 563E12881F for ; Tue, 18 Oct 2016 21:53:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932115AbcJRVxR (ORCPT ); Tue, 18 Oct 2016 17:53:17 -0400 Received: from mail-bl2nam02on0073.outbound.protection.outlook.com ([104.47.38.73]:30289 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756092AbcJRVxP (ORCPT ); Tue, 18 Oct 2016 17:53:15 -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=9wYab+tsYT/QCg4UmDdZRse0isYe2uzcBzyLDiSF1Pg=; b=dU+YvZjvy8sXGIpqt3ca3zNn/Ly188OIDjeszDBsEO++fBGB8T1z828zeFFK17GkWGgNarZh6fM5ZkbWPNZPqUJyDWkeK78SrK7tXGJctlfNfxVMyj9Dqxb5n4KNkg7XNkZqdntcz0iildlpEDH6dxYDq20+CSSWpUBbF3dcsW0= Received: from BY2PR02CA0054.namprd02.prod.outlook.com (10.141.216.44) by BY2PR02MB1622.namprd02.prod.outlook.com (10.163.26.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.659.11; Tue, 18 Oct 2016 21:53:12 +0000 Received: from BY2FFO11FD013.protection.gbl (2a01:111:f400:7c0c::116) by BY2PR02CA0054.outlook.office365.com (2a01:111:e400:2c40::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.16 via Frontend Transport; Tue, 18 Oct 2016 21:53:12 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; 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 BY2FFO11FD013.mail.protection.outlook.com (10.1.14.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.7 via Frontend Transport; Tue, 18 Oct 2016 21:53:12 +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 2A.FD.61581.B8796085; Tue, 18 Oct 2016 14:43:40 -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; Tue, 18 Oct 2016 14:53:11 -0700 X-AuditID: 0ac94371-5f3ff7000000f08d-c9-5806978b3d69 Received: from exp-402881.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 68.B3.03615.7C996085; Tue, 18 Oct 2016 14:53:11 -0700 (PDT) Subject: [PATCH v3 10/11] nvme: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code To: Jens Axboe References: CC: Christoph Hellwig , James Bottomley , "Martin K. Petersen" , Mike Snitzer , Doug Ledford , Keith Busch , Ming Lin , 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: <39c07429-2508-4123-8fe1-ecf407f8571d@sandisk.com> Date: Tue, 18 Oct 2016 14:53:11 -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: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHIsWRmVeSWpSXmKPExsXCddJ5kW7PdLYIg2lfuS3+7znGZvHy/AdW i5WrjzJZrJqYZ3Hv6Bcmi723tC3mL3vKbvHsUC+LRff1HWwW5z+8YrJYfvwfk0V7bwezRdvG r4wOvB4Tm9+xeyze85LJ48GhzSwem5fUe+y+2cDm8fHpLRaP9/uusnm8fbmT1ePzJrkAzigu m5TUnMyy1CJ9uwSujIV/j7AUHOGraHnyh7WB8QRPFyMnh4SAicTNme1sXYxcHEICS5kkvpzf wwrh7GCUOLfvHwtMVcP0ZmYQW0hgMaPE6T3ZILawQLLE83UdbCC2iICsxPfdr9kgauwk3q7f yQIyiFlgL4vEw8u3WEESbAJGEt/ezwQbygtUtOb6baChHBwsAqoSX7odQcKiAhESm77OgSoR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JLTtk3vflZhyU4/uU6a2x2SRw1Y2r dQ0TnjXOOtT/sGRr8PuTmX1zJH4cDbvubNewjaXU59APX0sFlgdXvuorsRRnJBpqMRcVJwIA oMxw7zkCAAA= 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)(65956001)(50986999)(2950100002)(65826007)(2270400002)(229853001)(69596002)(106466001)(356003)(6916009)(305945005)(5660300001)(230700001)(77096005)(76176999)(54356999)(7416002)(586003)(19580395003)(65806001)(64126003)(53416004)(87936001)(50466002)(47776003)(33646002)(23676002)(83506001)(86362001)(626004)(31686004)(97736004)(68736007)(4001350100001)(2906002)(110136003)(4326007)(19580405001)(7846002)(92566002)(36756003)(11100500001)(31696002)(8676002)(81156014)(81166006)(189998001)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB1622; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD013; 1:PITKz9TMAGcc0lgMv/OqQqMaY7rnSVtM3aDERKSIuEuIIAR6SxFl8+QDRuK3v/N0+6n2RZPijGSOTT2rwc9CtjDfUH9oKSVcYdlhbhXWLR2SAnY+YPpqjmB8rG+21b4At/rWUwDcL4nnAG7pj/lB2FPknFNf6TvA+bekct/a4j6NxKzACfvh/u39lYikKxWD6/VKc/4nRRlx93HDY5FWa1es85oD5gPNM9SYMb8aCQT2ZQ2KTm+ZiHobNPDbaNDOszC+R3K6hLK6fvQ43a1wjOe7eSmA85tGqxfWA5sd4WBlaew0FzOC+UEsxtdDSig15U8aKJ6NrowyPUFaB/kiHXV+ElhPV0jACmcD5wz0g+dsn5GGzDU6j9+9D5GN80idjIxlq3IuMHj3I0tekpXtVu46pp9Omc9Pw4FhWtbgXBLAM5yHGtofqV5KtM6DlFuEqb4Pz96cbXNlIYF8pyZ/ETrcnmiYjbgeNZtH35x7jNSDoKruxjit7kBhU79mFHvzX56XEdQG0G5l2JrEv3QBC4nXAKhUwnrB0iHvXJlvbKIUu67ak903jRAf7hYzPfo8 X-MS-Office365-Filtering-Correlation-Id: 3a67650c-ea6f-4c0d-6848-08d3f7a12813 X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1622; 2:US+uT/qwNCt7MZ/Ensfz+NZGuhUM/YdO9L5O0Rc/U7bHHnSj5PfteV6amvueW+zGHqYiZYfWDCaN9HjiUwOf4eQ5VtcR2AXdY0xbFHF64pQzgLhAkBakgajFtn9RnPgnBH1h8aM4n2Ds0e5Uo/9BdOmBKJ2wxYrWl6Z01bxA0ghci54aNbZbU3P77FBHOlCErCc8wPOtXjOLJ3BniAWLaw==; 3:coqgib+aUMzi1n5bkk3XaUPVOXM9bEjMy60RhEjOMmusyF+1hM/gYYiLZsnwdFMFhGwDPQr5JihiGbt77QUJu0lu1RVBjq6lAwuIXpoBUAywutrKx958tIKGuQHhAHIOCUb4K83AYB9LZDFSwNGZ7ZLIIoGbaKGuRUEMGugu95eHU+zyfgWeSTYgz4AYdQugy5FEZtvN6CS1kcAYc1RQ8LfECK+mGysbVpYKvs7GMZ8BFSjLgvtP3AHSLN4YOtk+aELI2yqlxEyGiq1yIh5CBHPDXwAODPaI9LQ6jkJdpoM= X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:BY2PR02MB1622; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1622; 25:7vpBxrjNzdPcm4TkEYV7+SYH1Fgpv4r2TxPMZq4CCu1t1D+p+5iOzO7acd2BwY9DQm3SVpChJ7WyZ6yzbDvBek2UTh0MUtzVGWyA8qRNiWhk03ix/tlh2dC8hiE+pkUaEMp4EXvtoC/IQtImN+QxytVo+f+tWQTKfkBL2XIV4GCGZwYALC6Gclwb7wLdG8mZgtEjlA7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270Ut2BMyvxMCj9qll928WSQUVTrwJ8TL/0WyWmFk8vW0OYP4oKlqMOqX4I+dK/ozVlPpbLMIcfQ5AZvaAWI3kxX92WARbQzYDdZTZBE7Ql5HYqj5UNn12sgztqIlBYnZpueoTbbt8srap+suveOVg4fEKOc/WcQ4NAjVKVh/MKoHPC3AkSU9cIsMdou4TiM9cUOlC1VhjmiDP4rxQHomZPyjjxDrL4BsDq8D6OontNNh27YqKUNJm99T4TO4RXWSbgmct2zzW8lD/pj5/i79l62f9vMOaO3hM7RsjgtUC+MihPcYCExef93EhFoq2cM0uW4IknQ00Hog/ 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)(5005006)(8121501046)(13018025)(13016025)(10201501046)(3002001)(6055026); SRVR:BY2PR02MB1622; BCL:0; PCL:0; RULEID:; SRVR:BY2PR02MB1622; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1622; 4:t/zh7h1DeR/R7vCnPnbW0L3gstzj/nDt69xaiwFnab3tAokz2xEXMJl+Zsd8mp16u/FSSyU6yuPjBGyYdghqDp6rRaiVcJKu7Y//4XnaU6+lEdIitsq3QDzzk1jlCMoaGUU9sZPw+YecaqwmQ0HZbZ2IIz+K6Qf/+pRhlrijzH46ziuFj9SdF/eOMQuG35I0Ln499ekAro6j2MiI2+7yJ0FIWetM2NuPTZgkZAWSTfhUcEULiauQuUGtD9N6NPqnOb0UL+B8QRscSoTRfIaqnQf9pD1w4NV1mo8pmqRQs4av5GBWqQj94Nr8i0hI3vnwQPC8HqnLt6wbU8nro6G8WSOLrRM96wm4jU2kSqsM8jkbPOSTM6xDB311J3blris4GWTzMqLr3lxL1xsrd2T2Z1MPjsYGjp9IFUagOizMD3ZbwVOALNxBDlrPa5CgD4kuf54vRsrHgfiaD6dblRFfyhihHOhPHJSb2fGpPS1pjE1X3PsKQkT6Dk4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UEZWRitLNEt2?= =?utf-8?B?LytKcDdsQXI2bENvTW11VDErd0JuVE9aTEFiVm41VmpZY244VDVVblZCOXJD?= =?utf-8?B?UEZoZUsza1BKdkFsRlkrZz09?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1622; 6:BImWJN97dV4Kq9vMa5+wO61xTN1Qv45y+5+QG9mx5SOuR4Kl8jKCexcztuZCNrvH0SBPP4EE1oFjir5fTsErUAiA74ieMzBGChR2oQj5AccwrfMSDTETaGgJZN5XoCeDExjDNiEoQii45A82t2ZA/uYPVUz9AmXzccY5VAP6glL2v0etuNbiKDs2tZj1zszdXA+GXUHNXSUwPP4fCl/FrBzRRx9Dgsq/45HX0g5cLw/KAMntDQ7CW9U/Y4vxwjY9+ngN/x9DsrKrjA2Qizf/C6G7gEhR65BhsbmZKJH8nREkMCIwUGHZWV/IlmSLD2HkelwNKbs3t1c2J42XlcuUK/nFZ2UCf9IutucCwu7O6ek=; 5:XIdVU7IfkkRjHgIZbnlr1LSafa4rJuyApGlvzZqLBEvSvkdsMB3J3nff3VOxHGRJ/4WJUAjZ3DvtLNTTtvlITYAyhhoUcm6G6mFpsAu7TW6Dj1lUZ4ddHSGXSEcs903hzK0hZjilbCVC+0VQpMo6Gg==; 24:i+JkSPFW/j21aRg722kQqtJ72mqPzfNsitJrZ4RN3pJIdJxsuX/9Ilwum+X7bksx/FfFCPBoslPgInurLFfXjThq8RWsQ7RTSCxCC0+CwL8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB1622; 7:MindpoCCfJWQmLc1ilz98KWu913r7yynwKmKppQcVAQDLEiE2WQvQyGL7PtTJ4pCtoUXgCuby50C0SX7cw7sCIrcrFPLnYD149i8XVLq8//6YRt5B2OoUBplRR+cYsITsLCSriHxfT7xnf2lzRrghZy9SrLt9lDrTi+x0hbXqDRc72ViYEtZwetG45IEtiH+Q617VdOrCUQ091a+CLnwubFBmSI4vtGXUsLAqA9AXDcwCddZoLYaD33KQwAeDxRACAKWt2GvbFfNqZIBE+RS6UKnIR/I/iZmxizhbfdXL3IGNRw6HMiBO8AmIRWAIBIiGAdAqwBJfYcnv7JkxbCzmgQ/rKxnQWQGcG18vWwLBF0=; 20:CnidR7FurBEEGm1bLAR3QEJpLjwuk009adZz2mzgYEGoteSMVut4NAYPGj8xjbaLxlhM8KpnY0Eg3+rxgoorqWwn0KcYu7zt6q/BOLJjreG2B4btFryYpV7yeQdPbKFNqX0HVMa89a3Mm0olht8t2x8tfWfQI/BUWcCR2OrdRrCoxe090/5rhoYXEeT79DDaMQtwhXZ5U8ungg8YMbCdJ1HLGOHKn/hRg5WWuzhawaAX2PwDQlNgPkWFdgEQvOht X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2016 21:53:12.0095 (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: BY2PR02MB1622 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. 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 Reviewed-by: Christoph Hellwig --- drivers/nvme/host/core.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index e4a6f2d..18a265d 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -205,7 +205,7 @@ void nvme_requeue_req(struct request *req) blk_mq_requeue_request(req, false); spin_lock_irqsave(req->q->queue_lock, flags); - if (!blk_queue_stopped(req->q)) + if (!blk_mq_queue_stopped(req->q)) blk_mq_kick_requeue_list(req->q); spin_unlock_irqrestore(req->q->queue_lock, flags); } @@ -2077,10 +2077,6 @@ void nvme_stop_queues(struct nvme_ctrl *ctrl) 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); - blk_mq_cancel_requeue_work(ns->queue); blk_mq_stop_hw_queues(ns->queue); } @@ -2094,7 +2090,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); }