From patchwork Sat Oct 29 00:18:48 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: 9402895 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 00CC5605EE for ; Sat, 29 Oct 2016 00:20:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E376E2A8B6 for ; Sat, 29 Oct 2016 00:20:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D79DB2A8FF; Sat, 29 Oct 2016 00:20:23 +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 4C2352A8E7 for ; Sat, 29 Oct 2016 00:20:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757674AbcJ2AUO (ORCPT ); Fri, 28 Oct 2016 20:20:14 -0400 Received: from mail-bn3nam01on0054.outbound.protection.outlook.com ([104.47.33.54]:52672 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756795AbcJ2AUK (ORCPT ); Fri, 28 Oct 2016 20:20:10 -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=3/29Y67SGBRNpjWeupM5BfuITNEe8jOvREZ2RYLhW8g=; b=qgW2xNNWffWIhKzWaalDmH0ot+k9VKijaRnh0XRm4Mkhxp89wlbaF9GJjFSQRfGVORPT07oPravmOp+EcI0vwsQi8ou0uBys/KrItkJ8zTP7MKMSYRl8XnDTXMgWPNN5RGWiw5N2MbzaiqYx/b3tk5SNPAUMiK0Zd9WA1d4O6bg= Received: from BN6PR02CA0050.namprd02.prod.outlook.com (10.175.94.140) by CY1PR02MB1165.namprd02.prod.outlook.com (10.163.15.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.693.12; Sat, 29 Oct 2016 00:20:07 +0000 Received: from BL2FFO11FD060.protection.gbl (2a01:111:f400:7c09::154) by BN6PR02CA0050.outlook.office365.com (2603:10b6:404:f9::12) 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:20:06 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) 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.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 BL2FFO11FD060.mail.protection.outlook.com (10.173.161.156) 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:20:05 +0000 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 54.2F.26959.D98E3185; Fri, 28 Oct 2016 17:09:01 -0700 (PDT) Received: from milsmgip11.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; Fri, 28 Oct 2016 17:18:52 -0700 X-AuditID: 0ac94369-ef8199800001694f-fc-5813e89d35fa Received: from exp-402881.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 2C.EF.02564.8EAE3185; Fri, 28 Oct 2016 17:18:52 -0700 (PDT) Subject: [PATCH v5 01/14] blk-mq: Do not invoke .queue_rq() for a stopped queue 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:18:48 -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+NgFtrHIsWRmVeSWpSXmKPExsXCddJ5ke7cF8IRBjduCVn833OMzeLl+Q+s FitXH2WyWDUxz+Le0S9MFssWP2W02HtL22L+sqfsFs8O9bJYdF/fwWZx/sMrJovlx/8xWcw4 v5jVom3jV0aL9z+uszvwe7yePIHRY2LzO3aPnbPusnss3vOSyePBoc0sHpuX1HvsvtnA5vHx 6S0Wj/f7rrJ5fN4kF8AVxWWTkpqTWZZapG+XwJUxf/E6poKvnBWPZyxmb2BczdHFyMkhIWAi 8e1TK3MXIxeHkMBSJokvi54xQTg7GCXeHuxh72LkAKta1MsPV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oGhoV5x Yl5KZnG2XnJ+7iZGcMRwRu5gfDrR/BAjEwenVAOjsPqf54xmJ3+8OPa2Y8/dVdzBu9baSCRb rp3w1mv1rSteNz9v+q0863zC6QeakXG2F415pmQLvO5xsZi+f1tFIHv/1xzT6OXV7qbPbyau U2rYtl9vku9xn/KL7QJcj4/dO/PukZXS75CYTMeLzqfyEp42z6mIsTgYyNO78OzkxsNfXxau U611U2Ipzkg01GIuKk4EACGsdiVIAgAA 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)(7416002)(626004)(8676002)(106466001)(87936001)(23676002)(81156014)(586003)(69596002)(68736007)(50986999)(54356999)(81166006)(76176999)(47776003)(8666005)(50466002)(356003)(305945005)(19580395003)(64126003)(65956001)(4326007)(2906002)(6916009)(230700001)(7846002)(65806001)(8936002)(2950100002)(31696002)(11100500001)(36756003)(19580405001)(86362001)(2270400002)(92566002)(229853001)(53416004)(97736004)(110136003)(33646002)(4001350100001)(189998001)(31686004)(6666003)(77096005)(83506001)(65826007)(5660300001)(7059030)(142923001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR02MB1165; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD060; 1:94tGgVhty3FVKH9g2LHcB1i4L7vIpMD6j3g5ZU7SwUazX66q0AKeU2Rpzcuy3mxM6j4/N4pS6GKCyfW+4+VQU2jOXSRYSRU3HOTVKd+hFhNUtN9GBrCkBVVhNhApkO5m90bNut0i45ITtPLaOdDLTFEqXntiaxUgq6rRStT9U78lv0vMjOWyE0XATadKj7AG/VI2uMv+OaNgRJgG3DqHfNZ2HBOAEHSwTlQOee2Ynh4jRpjvF3AlJdUyuoWZdloR8jztCfT56XL1o/SDlpl/hJ0N3jiXChyGOfN2xybObl5b68Nti3pfjR53CJrufhhQxJzZ450NhYEhGNec1QctZMvdkScXWvjPIyV8QGbDcSsuTNWszZD0w4lIMsVA40ubPYCCVucNeiAMVk1rNT4oi0FNRWVO/rLhwtPEB8e1xdbatTzAJUMw9KIUb5KWm8eFcmYjGHRgT0IVGVvE/XdcO4BD/GWOy1n44rpMUpAKc35AC7aH2hxvuTX5colN5uWqrMWjRr1KmU58dupylQoTrTAFrSA+H4UIR9mvwQ2ZYTRt4VEjjdUcfiL/o0nzNTQ8 X-MS-Office365-Filtering-Correlation-Id: 4588babc-0151-4ea1-b32a-08d3ff9155f0 X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB1165; 2:5w4y+xDw4NXJ/kt158AHAzyq77fQo2vFjtVJMTjcYWjJYnGT6PsIy283wXWaBFLmTLiEFNSThVTAMpEWfU8MCELKrebZOza1himKKJ4Cn7JblC/560sWKdOD+fZ+nAgfSipNHWQGutctsHBfeEkJI/fDfQEdBb7pZDvJM7+Vt7euJ/gKgvufzWwpxJXhligvRCUPcPbyp99BhuS+N4b3wQ==; 3:LsItpAwYFcC4Ci/2vB0/Hs/Jr1hg+hlbh2uYmx4kurdNB3Ixs1evqnl0e3symUpkV3Qwbisr1ZMSn2x/RL7hfLd6BAWeumlz9TP/XlhbxRy/gVFuSEaEVMd/0QEmfxuOh6NaYWPqXgVqR5J0PVVM/+IQVOwp2alELz86Pe+vr9oFxOMg6QQuimEwMp8AxsLKgFFlQXhIHA5gPRX7IttNbZa1K6qivj/OSwJhygm9VuB0g4wANHr6RVBHDy+ZmCLzUp5A5oSCshEvcyJixcF9lzp0NnrYSWWAIskoEjVJTpU= X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:CY1PR02MB1165; X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB1165; 25:If5dir0DuyItaBh97jCqLOTWzxOOSNHpljoIkQsRnSmI2WeLmSMcAnLsvM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/pMRbXFPCmRXihihc0LN1H2+BYaTTXWIPvq6n3ciJnBPNVW7tAdLWeNVZeKp9SyFxu0cvFhBjzGeHUYcZ8D6IscwzTHEA0/HLwnsnoQksN/HL56OYLXU94R4Ag80nkPm06ZErm9zhIYKm7/SF5MJpASOc6A8N6dRJQzPHayKNB5NQhrR1OKdPy6QknNTEvnVzVX3DxlbR4e5b7bKuKQp5TzTVdEXNMl14SHUxaS4JMgkHlwLGRmuXG5ERWcX3vGbDuiKA3cvjvHLFuYpD0hTnkSmDh8y8YeY+niRk0n2dpV+6MjLuCiWPs4q8bXW7tUQNDsh4fWUZQqGoBWFfbBkYz1U3v3k8rd+ZhTdLjeMK4rFRNm9W8NVB1B6zucjykL1klHMEcZvU3AdR8P5jUsI6M2eQGsfEwbkndLInluI/JrPA8lKIY4MN3T7jOaRFGl9hrkfJblgfWb/Lb+3zjsjA4IPnudFVf8V3pmnmfkyEhx 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)(13018025)(5005006)(3002001)(10201501046)(6055026); SRVR:CY1PR02MB1165; BCL:0; PCL:0; RULEID:; SRVR:CY1PR02MB1165; X-Microsoft-Exchange-Diagnostics: 1; CY1PR02MB1165; 4:unH2bdNIVKIZVA/tpiRNAlcEkXFX/L+fJvGbUdzftG4dbXHimPue+mlQn6l68Mhps1DjsNT9Rc6oRwplg7bILBMngBaF9vM75OGWoFk1yTwFK+lOXXgtbpH5IxemqzG3TYHhMyyfGPhgQ9B5iNUfNGch6045LeK/xA1/YvPNHxv7JbaE86goLatSkX7MKwrp0onQqvtneFq3fl+Ax5YXNfEdRoswak9RDqzTnYCVpxSi1XuVS6grMB4LFq/ZTmcCFvu6m9eLCKIdEhDeDRgyfajU/u3t/Mdm6sXvhOitZaUx/QfUFnaRRqAyQ70tfgM5lQqSm6fw2QnbVQ96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8OEi4934P7IscZFlm7aVcWMpinig07HK9z7ki+tk+M/02EniaADWORSqub+wFavi3N+/3UyjQ4nl0D8MofPRJ7PMxdEK4GvEwkR7r79Q/eFamx9zPIofHtmU2fqcSqPh5YRRiv1Yce4HpytxAjeTiNn+ontg7JKufdHjf+eImSykVsBlRUJrkzoNhdxp/7nvB/1uLTSuy47MOVyhaMCQXETCcbibAOIfPztWRi0DW+2RuVT667metpu5JycMqxexr9Smz8pxWxuwM0R4gRkqBSiyMz9CAAefyOqnBG43JieMLDEpC46EZE5low9B5kWCWAHlq4VuzxenmjpHnR+4b5u36jrYY9iR8=; 20:vj4UbZvRJnv4tTGwDij86uKqBOpxQzlgdUdBwVb8wyYWPLzFGo+mt/u5xB7u/0dwARUv8xwvVS07Z8IHrMgFr2OlQ7k6BiqibAYlhXeW5FJF/1rVEoARC0NuLwZmYvLFhYXZjzcoZ3myhLHt4Z9I/k6tt2ZWUj9XRePL5oOkKF23Uax5Fe/p9yEphAy7Zb1vYcmxB8NsmaSny/5mJgEkyp8gU7n0OftVNiw2eK7kI0QqosgDrLok9YY9Pu/JPVRw X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2016 00:20:05.3602 (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: CY1PR02MB1165 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@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 Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg Cc: --- 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 f3d27a6..ad459e4 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; }