From patchwork Tue Oct 18 21:48:43 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: 9383101 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 EC6CC600CA for ; Tue, 18 Oct 2016 21:48:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E337B29769 for ; Tue, 18 Oct 2016 21:48:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7902297E3; Tue, 18 Oct 2016 21:48:56 +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=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 5417B29769 for ; Tue, 18 Oct 2016 21:48:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755983AbcJRVsz (ORCPT ); Tue, 18 Oct 2016 17:48:55 -0400 Received: from mail-by2nam03on0082.outbound.protection.outlook.com ([104.47.42.82]:38216 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755546AbcJRVsw (ORCPT ); Tue, 18 Oct 2016 17:48:52 -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=k69P9bI4SzUQsahQ6LHZg4babX8ImBjSB+GOd1i+gvM=; b=obFkObqLyzJWNKQqb9kWGxh/ZfefrPCIer80TRoiXZ0AvLC9IB7Bjlw2HMfR+yKXZaBeUx09OszKLfVEqeEmYnRuuGTgCjwgRIalw36iE1z9afmBYaSja3SoWWs/w9UAvIeZREwp7eAvbBDfYSbPSz4u2Bv04MoV3yq0UgZQBtA= Received: from BN6PR02CA0026.namprd02.prod.outlook.com (10.173.146.140) by CY1PR0201MB1913.namprd02.prod.outlook.com (10.163.56.23) 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:48:50 +0000 Received: from BN1AFFO11OLC003.protection.gbl (2a01:111:f400:7c10::113) by BN6PR02CA0026.outlook.office365.com (2603:10b6:404:5f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.659.11 via Frontend Transport; Tue, 18 Oct 2016 21:48:49 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; fb.com; dkim=none (message not signed) header.d=none;fb.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 BN1AFFO11OLC003.mail.protection.outlook.com (10.58.53.74) 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:48:47 +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 C6.CD.26959.C3696085; Tue, 18 Oct 2016 14:38:06 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.9.6) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Tue, 18 Oct 2016 14:48:44 -0700 X-AuditID: 0ac94369-b97ff7000001694f-13-5806963c2d0b Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id E0.D9.02564.BB896085; Tue, 18 Oct 2016 14:48:45 -0700 (PDT) Subject: [PATCH v3 01/11] 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: <595d4b59-3892-ef24-ef91-b7cab6611af7@sandisk.com> Date: Tue, 18 Oct 2016 14:48:43 -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+NgFtrAIsWRmVeSWpSXmKPExsXCddJ5ka7dNLYIg3/zNCz+7znGZvHy/AdW i5WrjzJZrJqYZ3Hv6Bcmi723tC3mL3vKbvHsUC+LRff1HWwW5z+8YrJYfvwfk0V7bwezRdvG r4wOvB4Tm9+xeyze85LJ48GhzSwem5fUe+y+2cDm8fHpLRaP9/uusnm8fbmT1ePzJrkAzigu m5TUnMyy1CJ9uwSujC2rOlgKPnNUfGg7wdrAuJm9i5GTQ0LARKLp00Igm4tDSGApk8Sbhn5W CGcbo8SxlQ/YYKouXupmg6pilDg59wgTSEJYIFBi7+ybYLaIgKzE992vwRqEBOwk3q7fyQLS wCywl0Xi4eVbrCAJNgEjiW/vZ7KA2LxARTNfdIDZLAKqEpv6HoHdJCoQIbHp6xyoGkGJkzOf ANkcHJwC9hJXD4SD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0Pt7MGuyiI3PXc brhD7UdeaPniuKWFsT+0GO4srJ9l1Plv/4/1T9udf1W1cydcPH9+Y3GmEktxRqKhFnNRcSIA V9L6nToCAAA= 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)(189002)(199003)(77096005)(54356999)(50466002)(68736007)(189998001)(92566002)(31696002)(50986999)(6916009)(230700001)(2906002)(356003)(106466001)(4326007)(87936001)(7846002)(65826007)(5660300001)(2950100002)(76176999)(305945005)(81166006)(65956001)(64126003)(36756003)(53416004)(7416002)(626004)(23676002)(47776003)(65806001)(8676002)(4001350100001)(110136003)(86362001)(83506001)(229853001)(586003)(19580395003)(33646002)(81156014)(8936002)(97736004)(2270400002)(69596002)(31686004)(19580405001)(142923001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0201MB1913; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11OLC003; 1:9seT9bDNhOo//s5duMd9kuQvXZ3Nm/nPXpU3F8mNzuyN7+RG4im35GqiKGRfzTxR34DAapnD1NtF0DlPLBuTtv/bghx921PChH4BzL4rvNcx80AgkITIoiYX2Fj5osChxsWbgAjZMVyolGhMsYCruEcvLfv2qFmZyucwMe0fGyV8CQP4LwrzYf2PFhx9/O1zPFoOkyhYjN+n+V+OFZwvkAlCBt19J1itXcEeneaBwdGmDITVO/LamJzaqJRuNhGmEgohwbkSEZZ9GGdFnciFB6XBc8FTpuGbiFyrtilRSVS3DEcr/NTv8O5l9o71JLbYq+PihjDw4JXdxxNp1edps89vDCEeEbTBdPnsFNIC/BkNrU0DExdnPsJJ7aK20gqVgo7uPkY8MP9kUoGzVmL6CwO6r6Kdt9A2CnRZXAIsUAo7CuamhVE67SBVcSoBn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fZjleh9am39X8Hsz9DCkT2Myi1yzOY2M9pT8lGFD/UCXbMmvljJe5Mfj1I/77malJOf QbuSOQg6UKeFQUJv9Pz64U9FP7vbn+nMzns X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:CY1PR0201MB1913; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB1913; 31:iGoPDz162i0oz03Aid/FRRilrqsDiN4OxaPyqG591PUOshJEukKi60h+/LuxbdZtL+HLULITIKpYYeSZ+pZKpMi4FsX6X47OcPHCbeRBgL+wEZ7Lt7iB3vv+0LP89qH5diI9CpTHqd0uwyzAJFZVkdqwu+bNVJHNnJbwpzYokJL8iLVOMLli+2kWbHje4Qt3Z2Y9bZxBMZFeHok+rPpOdM/SKP3+gIiq/3OOD79jb/IxpSWbKPejStaVH5mRMYa9; 20:Vx81pKfd6BnupH1xb1dCAzVDf3Owf+1wzAdIx1nXyT8K+03WSS4SWKNgCyjs6YrmKjnCpAZgx8KnnneOE2Ha0XU4brdGHrrwcli1hWqWZKLY63xtw7zLf8pk2YhjOkd4/d/BA0BuYBpWWIxmp5muxnvOhiDVZMtUDPZkQlJj3iL24u7UpgUJJlXBKz6eiyaXpT1psjc3s/2Vl2hKLvKgZwd0BCrDbeA6ZVkC6+73etwmAWl2T9uEtxMVdbVeDXcDX9EEq32jqMnQBOQwqROuzdnKUzkgs+35uSsGB4VzozOCPIE3QqBZB6wV+jWKQ1nP/F+blE+rcGBV7iXFjUx8ZMVm90PhX9cMMgWlhMEHwheIrt71ZkpkjN2U24uGWQgeF8Ss10/uqX4eDjurmxegG1EIoX0gf/CwsWATJZIyIcNPp7da4b2TdsSevj19micb2W1nNvewJh4vZP0B6vVP5tysVsWz7cGe9MP60LTPGHDr8fzkxOChNiqF1wbKHdg5 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)(5005006)(13016025)(13018025)(3002001)(10201501046)(6055026); SRVR:CY1PR0201MB1913; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0201MB1913; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB1913; 4:hbUPCnUIz66slPPjyNVH9BUDRt0o2S7/CrvqI+mdZMOHZzyL8T4Zz+46w+iAeVumt7lTPiKjiGI7SP0ng1HWgyjW9zafWaxzQ4AybXO09v/ROPGWRm/FHhFtAxpLv0PpgbyyTy4VBGgxOa+dUivpoKvEJHs2crMSQ6qYpp1PTM4v4zu5tCi+BrhYmljJVTFv4H5KaIgvj+vGVNX7OqflChVzSwU78Gfp7hiUVnGhP/ki8GQ74yzWx2YQ+SXKWraOHjqHy7c67decdKLXo+O0Ucn/W99E8S5oVBmstYLx2cPfHO1/XMtsooCGi+7uI2rJMyZV7Yf+KAoPQZutGHEB9pd7Z/p5brdEoHuRZIpR7hiT11pcdl4ILVJb8of0Y0QnS4Hq9Jj1t/UKDaVHTLJNCWAvXheED36svv5NWR0DWnZlI5iQcyQ7DPc94aV2k3JJxW/1sd8lNwGW523rgnghLv5k0toKK7sRPWDkjMTEeHKuxYu5YEBd3975bfpdraB4kXsz/BB12sTPPBiv5/o2qw== X-Forefront-PRVS: 00997889E7 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjAyMDFNQjE5MTM7MjM6S0ZMZ3lRTk1uYmY5YkVPUDdFa1Nibm9I?= =?utf-8?B?Vkk5SDNJdTh0ZEtQVUx0RXQvN0tmNkEyUStTTVZtd1djVEpUd2F3Z1N5S0xU?= =?utf-8?B?UnYvUTg3cVByNm0za2FJbUI5VlN6N3c5Ym80QzVSdjloakNzODB1VXhKRnpH?= =?utf-8?B?SnBkaGxSZUxIOUhiMDB1ZGhRc3ZNYXgvakJjdGZsejByaEpZYy91ek5uTnBm?= =?utf-8?B?WEZ5SEx0M2pCQnZEQTZvclU4ZG1TYkI0NGpBQ3d6bFpody9tTD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uu2Hq03J2dXvQEn4q5T4Ls/E3Rcp7OVUrAA5gc2buxWPjdFKAnLmxKFE3tHDzf31m6U7IIm2NSqeq5Pcn67kYPO0044gJzj4UMAFDR0ZIc0w==; 24:FFXhDYZxLYVDQ8OhRRFZzO0nm9FxdPGcpSWfbN5hGlX+ba//+kHCNwcIQqtiO90TAUMrJvlmiSeMMCIM8l6BUG+Ybpi5nJcJpY1W4C3Zg6Y= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB1913; 7:DJpBZGyeH59RfDYtbrGDiYNUUlusVT4PvPQhfjBaLRT+cvnH9PilITHLJv/09ESMwqOeRL9eF10uT1e+yem9mTnQ3Mld0zNkwWvcaCiWG+2oNgajJyJghfy/mn513WWGvx8TAyw0/mc4fWywQqMJ0LQiR5hIRQiPVzpzN34tzjX4K/pPoVf9qs6XIFMIapOSdGiX3mdfGR+zYGVdxeC49QOtrc0vYSLvBagrmFRnubHZIJ/pb0Yt/Cvi3JDn9xJdgMVpZEH7EtYE8BrmheEIuWSGlyOV+WGyPJvrzhG/OTA17770BMv4DC/Qf45gdP+sQKeXBIR9aSoH/yxVw147QYzTpFdfGUUInWDMptifkww=; 20:af5RoI30oOFfRUp8nlfHuzG+SYlt5eqMipAvut4Gn0ek94rSHmEYF24yhEpjUMcYr9nVfq9wU6c7mOx2Ut7RJ19qGqN5wDUq3ocmFFWC6ZnJNQJOlfWQNgM8MRJTdWYcPWx9g3yzUNMmnEnX8p0R3HF1DIyvLNamI+xpfCrsu9WGJs6TLJByz/Te3iNMM002xVgxXV2we39EyFw1o+/T5As2BjPiYG+Yp2nX45f4i8XKDqqCTmdAazNVodM0juUu X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2016 21:48:47.4814 (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: CY1PR0201MB1913 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. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Johannes Thumshirn Cc: Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei --- 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; }