From patchwork Wed Oct 26 22:50:44 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: 9398559 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 C58F96059C for ; Wed, 26 Oct 2016 22:52:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A02229E26 for ; Wed, 26 Oct 2016 22:52:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DBBE29E2A; Wed, 26 Oct 2016 22:52:08 +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 0EBCF29E27 for ; Wed, 26 Oct 2016 22:52:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934273AbcJZWvA (ORCPT ); Wed, 26 Oct 2016 18:51:00 -0400 Received: from mail-dm3nam03on0085.outbound.protection.outlook.com ([104.47.41.85]:35456 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932556AbcJZWut (ORCPT ); Wed, 26 Oct 2016 18:50:49 -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=buZTmX3L0njRfoOMF/3UnCsodVbcnlyGGFqULiZjHU0=; b=QHXSRWtAI6sPVw1zh4m2q1XiYP27j9OjvUo7u+8DrY7mcUSg6bDDlj5a/fTiKx1Id+eIIEluR40NT5hEft9qHAqdQ+0oiHSGOmgVKQDlWprmawid93ShlSbJVqlKgyeldUd9uErp6MtckMyzQDrh58j/2Y2EDXTr+gGxsUQgnZk= Received: from BN1PR02CA0033.namprd02.prod.outlook.com (10.141.56.33) by BY2PR02MB265.namprd02.prod.outlook.com (10.242.236.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.16; Wed, 26 Oct 2016 22:50:46 +0000 Received: from BY2FFO11FD035.protection.gbl (2a01:111:f400:7c0c::151) by BN1PR02CA0033.outlook.office365.com (2a01:111:e400:2a::33) 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; Wed, 26 Oct 2016 22:50:45 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) 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.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BY2FFO11FD035.mail.protection.outlook.com (10.1.14.220) 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; Wed, 26 Oct 2016 22:50:45 +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 EA.C2.26959.2B031185; Wed, 26 Oct 2016 15:39:46 -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; Wed, 26 Oct 2016 15:50:44 -0700 X-AuditID: 0ac94369-b97ff7000001694f-2e-581130b1e5a1 Received: from exp-402881.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 99.B8.03615.44331185; Wed, 26 Oct 2016 15:50:44 -0700 (PDT) Subject: [PATCH 01/12] blk-mq: Do not invoke .queue_rq() for a stopped queue 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: <1debcf7f-c950-308b-d297-3e48a77e08d7@sandisk.com> Date: Wed, 26 Oct 2016 15:50:44 -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+NgFtrAIsWRmVeSWpSXmKPExsXCddJ5ke4mA8EIg+cv+Sz+7znGZvHy/AdW i5WrjzJZrJqYZ3Hv6Bcmi723tC3mL3vKbvHsUC+LRff1HWwW5z+8YrJYfvwfk0V7bwezRdvG r4wOvB4Tm9+xeyze85LJ48GhzSwem5fUe+y+2cDm8fHpLRaP9/uusnm8fbmT1ePzJrkAzigu m5TUnMyy1CJ9uwSujAuvzzIW3OKsWL7wMnMD4wSOLkZODgkBE4mF3e9Yuxi5OIQEljJJPGnq ZYJwdjBKnNi7maWLkQOsau9iOYj4YkaJ29tXMIN0Cwv4SBx+PB/MFhGQlfi++zUbiC0kYCfx 88x6dpAGZoG9LBIPL99iBUmwCRhJfHs/kwXE5gUqOvBsOlgzi4CqxMsz/8FqRAUiJDZ9nQNV IyhxcuYTMJ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F+97HlugmTtmZ2f22wveInm7D6VOyP G3WXmMviVksquB9SyszZcOVlE9OZpp/N146e2rJF8dDqnVOLj1cosRRnJBpqMRcVJwIA/dTg KzkCAAA= X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(199003)(189002)(4001350100001)(6916009)(50466002)(4326007)(189998001)(2950100002)(65806001)(69596002)(65956001)(97736004)(23676002)(36756003)(54356999)(50986999)(83506001)(87936001)(47776003)(586003)(2906002)(2270400002)(76176999)(5660300001)(31686004)(230700001)(7416002)(33646002)(92566002)(8936002)(81156014)(81166006)(110136003)(11100500001)(65826007)(626004)(64126003)(19580395003)(77096005)(106466001)(305945005)(19580405001)(31696002)(229853001)(53416004)(68736007)(86362001)(356003)(7846002)(8676002)(142923001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB265; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD035; 1:EkIn9/IWnxzLIODuNXFnLa60xOrFSYZUiCcc+Q8ROeN+uJzXYL6pJydNAEwWc/cbmm0JgK3Iq9Yzj1pGMNmFx9RVkb2oaezlrrtApGrLZCUh9HycM6ANn4zanLiKAVw96h0aKwb5mJUUDXUhagFKcTJhyT0i+Df5lQ2xyvBGUH0rBTSVenY0kXxqkeskoJ9b9HgczDK2VtOlsxJT8EzDUnTAHzpt0nn9GbKPGXCS01dZo/BF42XeOLZptR02J9RxXgvdBUyyxmOyx5LMwhT8PoSYTxN6vpuBBU/tH0J516QJ3pbZ6A0gN1WPzPKbOxrMdciyu43Ya29qyg6FDNgcBNg78ev/UU3VywSZqdHvoO+zOT34PHsLMr0AzLgvErJdzJavKYk1yFkc6gFyjbNrmwoIaplJvc8AGIdNuKb3QM7IsrSyenQ38tk+W/tgUK/kMEoY8rtAFOxdyR/cxmsP8ZRdfT0qdT/SQqfrHI7QHHkYUS+81kq0id1fPo1hbdWKO1EyHVRwSX50q2fM2jmMzUmPCVeWsGiq9XF72y1vCB74eevKfNr7+Lxaa+ALhzmH X-MS-Office365-Filtering-Correlation-Id: 00193994-2537-46c6-57d7-08d3fdf28567 X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB265; 2:JUsQcCjknh4LaGqRAw2m43Hp/+nJoOh1oVSO7D8YK50iZFL9bkzvgfsypcoYzUUsmZ/MJFwqsERQsKEWMNRtQUWSLdBFwMJ52KqU8sTt47BeHYL2d4/V4q3C189M8ZIdEivkgD0apiEfuXGud8jQmdawsUtz9HNb8JkvHbTD57lcK2Fvd/9+mS647fh9BeOXRHu9zKrcdzFd+rTHgVnYRg==; 3:LVMH2aJOr6m9HT24uiRtk/nYS7p1zYmw7xMxSc6KBzbkP8cuYKxu3W4LeS80p8k1E6IaUI5y5EHNojKn18/TQNJ2ecwp8/JT70yMj2CANAXfdjdOKadGQtuNtmmemMaM3USVKeEmUb5Csz7h/udWyVd/EuBkerf1vEvT5tWyEvzKroRFcZz1vLijh/Q9zYw5HN56hpcFmpAu0pnRkn3RkzhXuq/TRpxFmVmRSl8mbsQ6EFYtzO9+aHFDPT9fadNLtnqR7YbpzUooT5cFv0RZ5faKODGxXJ91XvcDN+gB3Eg= X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:BY2PR02MB265; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB265; 25:QDpWVM6jTkK5iINRme4C1F8emgmsgahqYiInX4uYJEWWpmnxispcNDRhod0nUBzYzzjCMMmxZjmzRfngUyZgLON31psxeVPJfc9+XgFsn6tMmZ1irMU8D4uT59z25rUI1//aDFsdS1lhbcj8U1xTYL/DndNfbdL3a3qcRl8Ef8oOzmCJB01iyV7DbWPJN7t+Mfjm28ABsa4CjNczle4NXscqjB+bcLSyl6t3O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up+J/eoR3K+jCELdE+FlErFJOdfXo7VLHeklz5aEWANDRxRgNC+2iY1F1VwnCk6lANPijKB+HDqrZXmg5YA2xyvFupmiEOIrGQW0Mqq5f0hViHBS+Hfck0YqNEWd2LsprxdwJF+n28ZA+tbxKk3JisYGVxQR5H36sLli1F2/w3fnqZMLmXxe+j4KzOqcQJF10Hyu9Ye8mdHowCNSGUzJtYliWwUICu4k/RMpaRVSgFXf15wyteAloh5fHEGqlGHAPX4VAFugZv6W4CoXX2U5nl7bOi9WbymHCpjA0WSP3 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(13016025)(5005006)(13018025)(10201501046)(3002001)(6055026); SRVR:BY2PR02MB265; BCL:0; PCL:0; RULEID:; SRVR:BY2PR02MB265; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB265; 4:cC6ELlkvX3saszFmookhIQkm9x88Sl22yM7H1HwSBtrWubwxWTNbaXGIpxC4X2+GmkS0gMUBaqddhMamSw7IcUqZCm5zLRONFSSGeEwD7S1NGYJ0I48IhOkC0HXH0I33gx74NO+L7q24NXt1aP407KCPyj9khn6oib4de5ckKvqpgllP41CHCLvAzc0owzuPceyN4dkkQMo9NEh4BluvdXQPHb2HVwq7HCO1M8gUHYf7szrZqgF8l67oRLdcTc8twBVXDh7cjIJb6iA5zs5ZGpXBIcTKkFfYX9GFcawZuK6DyY97z1gBR2TTCooVH2R5UWFn3+v02eOM/YJBaSitHyw6cZW1V8loFEDUEASoptrMiY18cUT6OrC1CIyN69CliWK78cFPe9tKH+8ONSD0xd0zb5/kWftYryi+8FnfSrawqVqilnjnJqewX6qacnLYVFKahP/VtkbtKT+iKQQ9aYvpjPWs9s8vXNRo2FjLQG27Q8oE2d0+EqDSl0kol8pq/zr6B8XaE2sn5KH0h4gXfA== X-Forefront-PRVS: 0107098B6C X-Micros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ZgEoaLUx7K0kOTOhD6DOL5m827btjwVa8PwCZX46I=; 20:Rgm2zPi8mPAX+NKxdMVTICs0YZqMAUZV2kMbKpiqjuFv3v/awJc6KV1Pb2KkR0yL4gm2sPiMFz59GE9FoMnIszbY7xkHP/TeOS6osIWbjE19RrG7r4Xxp3zgFi0Tuei58P9Gz5sZEasFSPxWJcHdnzL2jmUaqHD/WlUgrv/T+vsnYZRM9omPCcZL7bQTaNR4//MUDeYZvLRy94w6Jd2MtCoNEvHoI+nNZB6O8S1xGnMPuuvjcPgj4omNlMtyuB5d X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2016 22:50:45.0179 (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.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB265 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 The meaning of the BLK_MQ_S_STOPPED flag is "do not call .queue_rq()". Hence modify blk_mq_make_request() such that requests are queued instead of issued if a queue has been stopped. Reported-by: Ming Lei Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Johannes Thumshirn Cc: Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg --- block/blk-mq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index ddc2eed..b5dcafb 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1332,9 +1332,9 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio) blk_mq_put_ctx(data.ctx); if (!old_rq) goto done; - if (!blk_mq_direct_issue_request(old_rq, &cookie)) - goto done; - blk_mq_insert_request(old_rq, false, true, true); + if (test_bit(BLK_MQ_S_STOPPED, &data.hctx->state) || + blk_mq_direct_issue_request(old_rq, &cookie) != 0) + blk_mq_insert_request(old_rq, false, true, true); goto done; }