From patchwork Wed May 31 22:52:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9758477 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 EE6F460360 for ; Wed, 31 May 2017 22:53:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DEE622766D for ; Wed, 31 May 2017 22:53:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D36C928453; Wed, 31 May 2017 22:53: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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI 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 23C0E284D2 for ; Wed, 31 May 2017 22:53:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751189AbdEaWxH (ORCPT ); Wed, 31 May 2017 18:53:07 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:42857 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751108AbdEaWxB (ORCPT ); Wed, 31 May 2017 18:53:01 -0400 X-IronPort-AV: E=Sophos;i="5.39,276,1493654400"; d="scan'208";a="124455730" Received: from mail-sn1nam01lp0115.outbound.protection.outlook.com (HELO NAM01-SN1-obe.outbound.protection.outlook.com) ([207.46.163.115]) by ob1.hgst.iphmx.com with ESMTP; 01 Jun 2017 06:53:00 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=6GrC3Nuwke/xjGb39NAtNn2uDqkLMj98p+tqMN+yZ8I=; b=b3A1M2WEGjAKPrOSIEExcy6NEz3f7Xb+aFKsQ4fEHuhEJ3dVHT/EtGsKQi+ExVB8PekXOmOjAFX9QkWzIi0xk26dxyU769xIMPAvJeCRe6fFAg6Rx2a9jZ5deC3zOpxyQAYwxIvftGFcu//xDhIuFSsisrupHVANuhx5DOjQbGY= Received: from MWHPR04CA0034.namprd04.prod.outlook.com (10.172.163.20) by BLUPR0401MB1682.namprd04.prod.outlook.com (10.162.214.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Wed, 31 May 2017 22:52:57 +0000 Received: from SN1NAM04FT025.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::209) by MWHPR04CA0034.outlook.office365.com (2603:10b6:300:ee::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Wed, 31 May 2017 22:52:57 +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 SN1NAM04FT025.mail.protection.outlook.com (10.152.88.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1101.12 via Frontend Transport; Wed, 31 May 2017 22:52:56 +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 82.05.51736.6494F295; Wed, 31 May 2017 15:52:54 -0700 (PDT) Received: from milsmgip12.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; Wed, 31 May 2017 15:52:49 -0700 X-AuditID: 0ac94369-6dc8f9800000ca18-a8-592f4946e9f3 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id DE.1F.18148.1494F295; Wed, 31 May 2017 15:52:49 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Christoph Hellwig , "Bart Van Assche" , Hannes Reinecke , "Omar Sandoval" , Ming Lei Subject: [PATCH v2 08/12] block: Document what queue type each function is intended for Date: Wed, 31 May 2017 15:52:42 -0700 Message-ID: <20170531225246.26261-9-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170531225246.26261-1-bart.vanassche@sandisk.com> References: <20170531225246.26261-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrFLMWRmVeSWpSXmKPExsXCddJ5ka6bp36kwb5fFhar7/azWSx4s5fN YuXqo0wWe29pWxya3MxkcfjeVRYHNo+Jze/YPS6fLfXYfbOBzeP9vqtsHuu3XGXx+LxJLoAt issmJTUnsyy1SN8ugStj9vImloJOy4obDTcZGxif6XcxcnJICJhIbJp2jrmLkYtDSGApk8Tl pesZIZxtjBIN7afYYaoWzNvBDpHYzCjR+vUuI0iCTcBI4tv7mSwgtoiAgkTP75VsIEXMAlcY JdZe/s4GkhAWCJc4erobzGYRUJX4su4eM4jNK2Av8WrDRUaIDfISZ7fsBItzCjhIrN5+Amyz EFDNpiOPwYZKCCxilVj3eDMTRLOgxMmZT8A2MwtISBx88YIZokFd4uSS+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tering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39840400002)(39450400003)(39860400002)(39850400002)(39410400002)(39400400002)(2980300002)(438002)(9170700003)(5660300001)(478600001)(50986999)(76176999)(6916009)(2950100002)(6666003)(72206003)(48376002)(81166006)(356003)(8676002)(50226002)(8936002)(50466002)(305945005)(1076002)(33646002)(106466001)(189998001)(53936002)(2906002)(77096006)(54906002)(86362001)(47776003)(36756003)(4326008)(5003940100001)(38730400002)(110136004); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR0401MB1682; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT025; 1:ff58bJHy5ulvtjlpkWgt4sj66cifzqO0YXLLJnRhlpkLelNr1pANMTWIwUBZEwBBqE3J08NgJavktl9mn50uJG9ILPZVXNdohQdBbTceXDfLTZcUY7YCksoOOn03ZitWpBZljVg9NF4Z3w2tZFMD77+hVwvDcH78PS3yhU8EdM4AYyKHytYur6zrU5WNXLe4U1HOLomd9XCh8zLBMoejFo7YtzMdH15U6x8MEaDxOJ4qpuccB1Apg6LWFmb880FFfJaPsHkj6gHaexbOCEg2IZpU1u/Q2VLlwg/VdajQcPGPbFpBKBdrP4yTT/ZjeNw+l4q/N4ajzSeSjBqN+Zlm+INGwRD6wE1zoZ+3yGtp08o3YSOmcq6QbGEfBSZtNKzxt5KEQYkcJtIwZb/AOXLQ/Hor+iDjHoBXQ/3JGBrPn3YhmAtlR3IPDXLbBpsSvhFeRoHlexPFqw8VlJFeJBjatd6Bye6AA+Em4LiLTXMLUGZc00InW/LwygPxSnbgTYKMSUXlPP6MB2EYzCnuH3BK7gsCIUY63KDj4ijxLe6f8Jw= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLUPR0401MB1682: X-MS-Office365-Filtering-Correlation-Id: 0cb8e93e-7884-4f84-f2ef-08d4a877c78a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BLUPR0401MB1682; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0401MB1682; 3:EeSTQDOLHp7TbEiogUdAbywT/75ORzbumWcc+PZOXbgk4+yTUYpWOXHFyUc3zadT7obCpMruZsCFzlOt2YteP5nbZ0t4R3/SvQdpqRYPUmOXXFc0b+m8HN11PQxEplxzre8ilkm7JE7JPnd3/RS0OP3Cfo8y7PleSnbTClcVzU5LlT8u9IJpA+hFCcsFKKqN8G7cClR40da9APptzg5D1WToSH9lQWmb1NqnoitrAXv3DtiKAyHQZIKC3LSRO2KpMY0uXTB7nYIXrMHP6Viowz3qHDEntR/lFcN3jRidVCM82Sl5iTunfNrVhLj+pRLhR0s5A9rst2vMxgrj0dzyQfgwDSFz0K9kMdv5SMFdnV6MgrcsieM5XrGvwZ1qnwme7PPgnoL06CJiFX3+QmIFa5LjTfRbraNqHpkP4jWcc/vfS/7tdgouFQ3EsGSkndy0YkdfVyVey/n+FYoLeQQ/Ylzh4Axs5wZc3/AYyJGK8wCld7YhwkRalqel/G5LoYkb X-Microsoft-Exchange-Diagnostics: 1; BLUPR0401MB1682; 25:Evly2V3m50l1rB00QuwqgkpbbnvfrM8UIyCPkq2ER+SkCRtDqaxpu11G9anPBoHZY9SZX1FMw2I/fVhp1yDnWqvktFTxHDP75V5nNfwCKbbXVuBVi0fTG7mIl7EMYXeYZGu1IxxE3pdmNoREvtBHJTXKAciqV6wloUr1ilwN2rieqCYG44Uf2bEfgNDzv3+14hIZVZDdyhojPXxZfVmORHaQyH28mE0o6iypJ7m7QHjUg9MEhP7DUD5bbKR/X4z4o67VD2MW7/HtoUfWEtle477EBUXCdG/rP38EGzgzNSOh1hnuoYtVGnwayI9Vpd6737f23ksGyPPhme86XwRVw7p69WkwtkxOLKxFJuaQ1uDk50zsUkkbmssu62YcEm99un/G2vHblgfq3qmfveRXUVkMa/PowJ3ulONx68kiE8vPoQZCB9UBMli1xlaZly7A7Ne1BzCbt+nqdoUsYCkk+b7KaYCTF9Ruq5c1wJO8Q2c=; 31:Z3Hb5Fuc9gz3x0t0TcGptYEgpmeg8cRRXU7v6proCAhsyeSJ43KuLn4j/fmrKYqpV46KpZuz8YHCiAjawhCrlp0PAM/Er5wwncITIcrLtTfZZg/ud81MJWzvqkAnvZ2Z3p5AK0njSTujhIM+QH1g6vKlHwB8QVCMG8N3IcHLhqfW194PQSP9FvTqwpgYQskIIOXgA6K+2bNrkzWOG6Ot77R+LsYVww+YEVCpEWFXsBhDaBfp24qvYVxaKUEH5xhXj87UjEMvXqRBK92E9QqzyA== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BLUPR0401MB1682; 20:cuutMLBYud9vZlhei1pRXkNkILNtSVZbDhHzjeTiWZ29XGNzRGAplo1iAWAVSo2iB/BenRps9bYfUAKyeW0+lsSafrz6NoC7mwTUvYOE+GO9z/Jj0aqE6P+qj/kvsiEcavNXogRQDg8EwUKA2mpIA/0kSfbycV2TF/b021hRAcd8sRoOv+WwLzvg7uBGzZ8Fu6qLq+pmVipzqTeIfy+eHv18DG4Rma+CVC0y/02EzAYePSIV3N4UpyOxYIXu1aHNftlq5IBGm/MNqgjvEGHrP+T4+gF4v6D7/C7b+ONe2TxQeN2QbkbO6BOMwegurNcFQ3xsCj2tngAnCwB71SFO5Ni03r79sjar7yfd3NDS0ZyMf4N+CpzR+A79CfdlQ7e9DmKmZpmxTtil2QkkkyDvHrdKH69atDT8ADh8zV4w2Yikfecv/Z1vpCaHaMKwQ8sHHzX0bYxcjKMc0/Tr0TL3UwcAIS9k0DLazV9gVe8qqFLaZPOUiuc5xQXNNIIhaY3i X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13018025)(13016025)(5005006)(8121501046)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:BLUPR0401MB1682; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0401MB1682; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0401MB1682; 4:DP4CT+QqwGhD42dPPELNq4dfbOrGSg86lAcVC52+yvGsqLEYO75+be1rWKV+gtnRNMzthLczmrzWnYmnSzQwcNY6PqoHINBbP3oafN+ncfVfbGbpiQbOhqXCzCE0bAZOVUnBmPLMKLNPDYLSQdQ9YpAO89tOhkukajwdGp8SLR/W/pdKgp+p71H7H/YsrUz0F1fzSKMhGQYKPVpm8LFngV79w93Za095ClgN/2/FKV0dWlXse19/5zYJ0ZjONBVfGpANSkFOLcVXKDZzlCiYV5She8cCnDUsHwA6hbhszly/F7J39J3w8GKlMVPCoOcuyByhYs1jscmurg6GCCceAI+Os6gRB0SEmHech51V8FwSLG0Cl/oujwTAWCGeJwOfwF/mM7yVAQ5SynXkM9kaujrDRcrMuC66NTDj3sUb0rOUrp4iQ2DPw4eWMvELf77HudSlYnTnrsf+km/ymDZNwn+L/Ju4NvqUUH7JkNsv9RVGRVPqfJVdZvvbQ0C4NKv/FeKm5SQmOYo+IM9jth/rTnrl6CMInPvOue8H2+Fx21Y8TaOpugcThG2oT3PIHiDMi0msOHtLVIqUHScZ/cT3k2exbLCUAfWs3Y1AoRTcYvE8EndYoK9FHISvgGf0/t5XLMzSLCndN11JWEXy73S5wIMX+gu5mPKU9icJ8pjh9F13U1vjpdRG270nIoyKXIIvMyGbDmosT/5ABCJam50FJp+HRVwyNj++9QDNsEnybGMI8QX0XWSvj4KjJdxAptVYBGwt96Q1Z6faRaNWcLn8mbeWmQPW+x5J/AnJ3If/TC39SeOBzH9Ks+nRVIDgF+2DmMlY+CkpRhoTPkB670niEylm/8iVDRK+9U35UbH09pFk3HfU7Fn3wvTYBOpnRt2c8J6W/CW+HvFeKAAoJ0OSYCSOkcfThAjpJFG6WESJ lxw= X-Forefront-PRVS: 0324C2C0E2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0401MB1682; 23:2ofK4RvB+cE6kD0b+xF46vQFwDqANkG3lknFO08?= =?us-ascii?Q?y/ItEQnMinjJkvuXQz4Xl6aoCThqtysFsgtX1InDo6FOpoDJd2PLFdD0sB17?= =?us-ascii?Q?fyqbLDdDtO/1jlqIgQ+l36ymf5oFdRK65b5iiTCyM7xyZ2G8Zo/++K9o+nVp?= =?us-ascii?Q?FV0hS8hoRBuzDrM/nqRjVOIFJ9wTA13BLasQnQgXh+QdaoTDnr3kFPCvXDUH?= =?us-ascii?Q?OobZ8Z+jE1SndrL0/Srh5lAYEdiP223tg37Pb5yvJOV8QKSOr4JDhBmzYAM1?= =?us-ascii?Q?05drR01cLr/V/8qHDNzkpogWfSS4ha98dqXR8zJxHR8M1ynJdyewXQNjaxK6?= =?us-ascii?Q?iBoNHTGHglVhW7Oe5C8HsF+AriWmnxQOSpCrYop7IhS4UB/IlbneBDM+F6TN?= =?us-ascii?Q?f5/REouOftbVoKSHtYsu5bSJlLCmg8yR6dxoh6kD/xdAGnlRdRThiNE42OdL?= =?us-ascii?Q?LbTWyENmFNpRK8lh/91J7zU+p38Etb9VxoUBtYPsGVp7oswkB+lg+rn+86sM?= =?us-ascii?Q?5crSALFgiJo86+pyUJB6kqgCkvw+D1F8aiec95z2WW3V/JnePfdLR+X3cGDU?= =?us-ascii?Q?Z/Ss3jtE3Odn0Og/8ch8ut0NU8yEIRmkeo/IKiry5w/SSKKMXYd8g0hgj23e?= =?us-ascii?Q?Y1OnF2PRaoTseXeoTchxtFEIjM51PK16jJyK84NMPkk3jUck5aiKh3x0G4QK?= =?us-ascii?Q?XZatwnmkCH1iACCd6QDfm7Uu/fo+8KyDK1dxtIgTpANEtzUIwmMrdMiHRPZ3?= =?us-ascii?Q?y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GrGeD/raxMlGVBMOr2DCP9+kbmSG6zLOJevW4dljWRrAcKcQhF+Qow40apfKeLbdng==; 24:l61zqXXWGdIx9lQzqL96lTbj+rjVvkHyLcwxgv71gV8XzXMKr1lM5WghEiBSMmZ9azPTSU7nKN17jUWudxfIJztXFIC2Tx4ON05jkNwtevw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0401MB1682; 7:yUbsvThvjvHZXgqnF1Z2PXb2XgA0VAya1PBxQdLjmWW5oPIZkMFTSosglzuH1LAxE1lklHNfI/xo3UMAo7l0s1joztVNvTjx2O5cfplM4zP+Wrziazo132iZGsQphv0EXKc7lbc583NyXi8l/ccHyuRMDsHcOUPWt4qyXhqhODVtr6Vjk266cz+ciIY0TqkcNmkloE3fp/xqF03K89mZnvNROmu4bDb6DTXggktS67GZN+/yTtGPA/4w3+mOK6F0ZUScZ3MN4DEoAnSaHPx4UWStHs2y+slZubI9SU3E60/LWVqVJ5NKWEsqyMXW1w0eFPbAmPmSlNADB11V3n6bXQ==; 20:exmPtFDZQjg9c3bp2KlL9NGviSZ19pVEQMP6febWiLErQ5HIN9Zl1jkLbJMFJxbTyty3MIG4x3aQT1EDcLikvD+OIVOKPWhTnRAFnnciL/2djcmKIbbGGlT1Zqyb2T+WmCZCRt0rSUGh5lcCX2uA3gIBW/XmXhIhoT7bZHl9Z0Q= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2017 22:52:56.3097 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0401MB1682 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 Some functions in block/blk-core.c must only be used on blk-sq queues while others are safe to use against any queue type. Document which functions are intended for blk-sq queues and issue a warning if the blk-sq API is misused. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Ming Lei Reviewed-by: Christoph Hellwig --- block/blk-core.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index f3ad963eccdd..4689c20943fb 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -182,6 +182,7 @@ static void blk_delay_work(struct work_struct *work) void blk_delay_queue(struct request_queue *q, unsigned long msecs) { lockdep_assert_held(q->queue_lock); + WARN_ON_ONCE(q->mq_ops); if (likely(!blk_queue_dead(q))) queue_delayed_work(kblockd_workqueue, &q->delay_work, @@ -201,6 +202,7 @@ EXPORT_SYMBOL(blk_delay_queue); void blk_start_queue_async(struct request_queue *q) { lockdep_assert_held(q->queue_lock); + WARN_ON_ONCE(q->mq_ops); queue_flag_clear(QUEUE_FLAG_STOPPED, q); blk_run_queue_async(q); @@ -220,6 +222,7 @@ void blk_start_queue(struct request_queue *q) { lockdep_assert_held(q->queue_lock); WARN_ON(!irqs_disabled()); + WARN_ON_ONCE(q->mq_ops); queue_flag_clear(QUEUE_FLAG_STOPPED, q); __blk_run_queue(q); @@ -243,6 +246,7 @@ EXPORT_SYMBOL(blk_start_queue); void blk_stop_queue(struct request_queue *q) { lockdep_assert_held(q->queue_lock); + WARN_ON_ONCE(q->mq_ops); cancel_delayed_work(&q->delay_work); queue_flag_set(QUEUE_FLAG_STOPPED, q); @@ -297,6 +301,7 @@ EXPORT_SYMBOL(blk_sync_queue); inline void __blk_run_queue_uncond(struct request_queue *q) { lockdep_assert_held(q->queue_lock); + WARN_ON_ONCE(q->mq_ops); if (unlikely(blk_queue_dead(q))) return; @@ -324,6 +329,7 @@ EXPORT_SYMBOL_GPL(__blk_run_queue_uncond); void __blk_run_queue(struct request_queue *q) { lockdep_assert_held(q->queue_lock); + WARN_ON_ONCE(q->mq_ops); if (unlikely(blk_queue_stopped(q))) return; @@ -348,6 +354,7 @@ EXPORT_SYMBOL(__blk_run_queue); void blk_run_queue_async(struct request_queue *q) { lockdep_assert_held(q->queue_lock); + WARN_ON_ONCE(q->mq_ops); if (likely(!blk_queue_stopped(q) && !blk_queue_dead(q))) mod_delayed_work(kblockd_workqueue, &q->delay_work, 0); @@ -366,6 +373,8 @@ void blk_run_queue(struct request_queue *q) { unsigned long flags; + WARN_ON_ONCE(q->mq_ops); + spin_lock_irqsave(q->queue_lock, flags); __blk_run_queue(q); spin_unlock_irqrestore(q->queue_lock, flags); @@ -394,6 +403,7 @@ static void __blk_drain_queue(struct request_queue *q, bool drain_all) int i; lockdep_assert_held(q->queue_lock); + WARN_ON_ONCE(q->mq_ops); while (true) { bool drain = false; @@ -472,6 +482,8 @@ static void __blk_drain_queue(struct request_queue *q, bool drain_all) */ void blk_queue_bypass_start(struct request_queue *q) { + WARN_ON_ONCE(q->mq_ops); + spin_lock_irq(q->queue_lock); q->bypass_depth++; queue_flag_set(QUEUE_FLAG_BYPASS, q); @@ -498,6 +510,9 @@ EXPORT_SYMBOL_GPL(blk_queue_bypass_start); * @q: queue of interest * * Leave bypass mode and restore the normal queueing behavior. + * + * Note: although blk_queue_bypass_start() is only called for blk-sq queues, + * this function is called for both blk-sq and blk-mq queues. */ void blk_queue_bypass_end(struct request_queue *q) { @@ -895,6 +910,8 @@ static blk_qc_t blk_queue_bio(struct request_queue *q, struct bio *bio); int blk_init_allocated_queue(struct request_queue *q) { + WARN_ON_ONCE(q->mq_ops); + q->fq = blk_alloc_flush_queue(q, NUMA_NO_NODE, q->cmd_size); if (!q->fq) return -ENOMEM; @@ -1032,6 +1049,8 @@ int blk_update_nr_requests(struct request_queue *q, unsigned int nr) struct request_list *rl; int on_thresh, off_thresh; + WARN_ON_ONCE(q->mq_ops); + spin_lock_irq(q->queue_lock); q->nr_requests = nr; blk_queue_congestion_threshold(q); @@ -1270,6 +1289,7 @@ static struct request *get_request(struct request_queue *q, unsigned int op, struct request *rq; lockdep_assert_held(q->queue_lock); + WARN_ON_ONCE(q->mq_ops); rl = blk_get_rl(q, bio); /* transferred to @rq on success */ retry: @@ -1309,6 +1329,8 @@ static struct request *blk_old_get_request(struct request_queue *q, { struct request *rq; + WARN_ON_ONCE(q->mq_ops); + /* create ioc upfront */ create_io_context(gfp_mask, q->node); @@ -1358,6 +1380,7 @@ EXPORT_SYMBOL(blk_get_request); void blk_requeue_request(struct request_queue *q, struct request *rq) { lockdep_assert_held(q->queue_lock); + WARN_ON_ONCE(q->mq_ops); blk_delete_timer(rq); blk_clear_rq_complete(rq); @@ -2414,6 +2437,7 @@ struct request *blk_peek_request(struct request_queue *q) int ret; lockdep_assert_held(q->queue_lock); + WARN_ON_ONCE(q->mq_ops); while ((rq = __elv_next_request(q)) != NULL) { @@ -2535,6 +2559,7 @@ void blk_dequeue_request(struct request *rq) void blk_start_request(struct request *req) { lockdep_assert_held(req->q->queue_lock); + WARN_ON_ONCE(req->q->mq_ops); blk_dequeue_request(req); @@ -2566,6 +2591,7 @@ struct request *blk_fetch_request(struct request_queue *q) struct request *rq; lockdep_assert_held(q->queue_lock); + WARN_ON_ONCE(q->mq_ops); rq = blk_peek_request(q); if (rq) @@ -2747,6 +2773,7 @@ void blk_finish_request(struct request *req, int error) struct request_queue *q = req->q; lockdep_assert_held(req->q->queue_lock); + WARN_ON_ONCE(q->mq_ops); if (req->rq_flags & RQF_STATS) blk_stat_add(req); @@ -2801,6 +2828,8 @@ static bool blk_end_bidi_request(struct request *rq, int error, struct request_queue *q = rq->q; unsigned long flags; + WARN_ON_ONCE(q->mq_ops); + if (blk_update_bidi_request(rq, error, nr_bytes, bidi_bytes)) return true; @@ -2830,6 +2859,7 @@ static bool __blk_end_bidi_request(struct request *rq, int error, unsigned int nr_bytes, unsigned int bidi_bytes) { lockdep_assert_held(rq->q->queue_lock); + WARN_ON_ONCE(rq->q->mq_ops); if (blk_update_bidi_request(rq, error, nr_bytes, bidi_bytes)) return true; @@ -2855,6 +2885,7 @@ static bool __blk_end_bidi_request(struct request *rq, int error, **/ bool blk_end_request(struct request *rq, int error, unsigned int nr_bytes) { + WARN_ON_ONCE(rq->q->mq_ops); return blk_end_bidi_request(rq, error, nr_bytes, 0); } EXPORT_SYMBOL(blk_end_request); @@ -2896,6 +2927,7 @@ EXPORT_SYMBOL(blk_end_request_all); bool __blk_end_request(struct request *rq, int error, unsigned int nr_bytes) { lockdep_assert_held(rq->q->queue_lock); + WARN_ON_ONCE(rq->q->mq_ops); return __blk_end_bidi_request(rq, error, nr_bytes, 0); } @@ -2915,6 +2947,7 @@ void __blk_end_request_all(struct request *rq, int error) unsigned int bidi_bytes = 0; lockdep_assert_held(rq->q->queue_lock); + WARN_ON_ONCE(rq->q->mq_ops); if (unlikely(blk_bidi_rq(rq))) bidi_bytes = blk_rq_bytes(rq->next_rq);