From patchwork Mon Jun 19 22:07:58 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: 9797941 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 EBC4760381 for ; Mon, 19 Jun 2017 22:08:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D423926B41 for ; Mon, 19 Jun 2017 22:08:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8E0826E49; Mon, 19 Jun 2017 22:08:43 +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 A6F6426B41 for ; Mon, 19 Jun 2017 22:08:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752637AbdFSWIk (ORCPT ); Mon, 19 Jun 2017 18:08:40 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:18495 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752670AbdFSWIf (ORCPT ); Mon, 19 Jun 2017 18:08:35 -0400 X-IronPort-AV: E=Sophos;i="5.39,363,1493654400"; d="scan'208";a="129340299" Received: from mail-sn1nam02lp0019.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) ([216.32.180.19]) by ob1.hgst.iphmx.com with ESMTP; 20 Jun 2017 06:08:19 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=QJdGHY0mjz9s74k6N4klE8fdrcrBWkcH0VJ9tlAPVcc=; b=WTnkur2S5SAGQQIPtMvv2zgt0ZcnwRMRqJKmCXtPdWGDfCTdKYfv06f6r4736SFXrELxOUFEoWxsLdtVNUV0aUOd3BpLSxuBQMvVL5C4VTa/pccaphMcyKPS80akM+ykXRu7c7x74BGhDlal4m1+s9ZRm/VW0T6cj4dAHN9hgsg= Received: from BLUPR0401CA0012.namprd04.prod.outlook.com (2a01:111:e400:525a::22) by CO1PR04MB553.namprd04.prod.outlook.com (2a01:111:e400:103e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Mon, 19 Jun 2017 22:08:17 +0000 Received: from CO1NAM04FT033.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::205) by BLUPR0401CA0012.outlook.office365.com (2a01:111:e400:525a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14 via Frontend Transport; Mon, 19 Jun 2017 22:08:16 +0000 Authentication-Results: spf=fail (sender IP is 63.163.107.21) smtp.mailfrom=wdc.com; suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=wdc.com; Received-SPF: Fail (protection.outlook.com: domain of wdc.com does not designate 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 CO1NAM04FT033.mail.protection.outlook.com (10.152.91.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1178.14 via Frontend Transport; Mon, 19 Jun 2017 22:08:15 +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 66.03.02805.E4B48495; Mon, 19 Jun 2017 15:08:14 -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; Mon, 19 Jun 2017 15:08:10 -0700 X-AuditID: 0ac94369-9c18398000000af5-3b-59484b4ec430 Received: from exp-402881.sandisk.com.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 19.4D.11415.94B48495; Mon, 19 Jun 2017 15:08:09 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Christoph Hellwig , "Bart Van Assche" , Bart Van Assche , Hannes Reinecke , Omar Sandoval , Ming Lei Subject: [PATCH v4 09/12] block: Document what queue type each function is intended for Date: Mon, 19 Jun 2017 15:07:58 -0700 Message-ID: <20170619220801.12557-10-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170619220801.12557-1-bart.vanassche@wdc.com> References: <20170619220801.12557-1-bart.vanassche@wdc.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBLMWRmVeSWpSXmKPExsXCddJ5ka6ft0ekwbmrChar7/azWSx4s5fN YuXqo0wWe29pWxya3MxkcfjeVRYHNo+Jze/YPS6fLfXYfbOBzeP9vqtsHuu3XGXx+LxJLoAt issmJTUnsyy1SN8ugSvj+b/PrAU77Sravy1ha2Ccb9LFyMkhIWAi8Xf7EzYQW0hgKZPE9ha5 LkYuIHsHo8SW7asZYYraplxkhUisZJT4c3ATC0iCTUBP4tS8fUwgtoiAgkTP75VsIEXMAk1M Ei0TfgB1c3AIC4RLbPksBVLDIqAqsfxROzOIzStgI/F4+30miAXyEtPe9bKC2JxA8e+TdzJC XGQt8fn9BEaQmRICm1glzr2bzwbRLChxcuYTsCOYBS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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:(10019020)(6009001)(39400400002)(39850400002)(39860400002)(39450400003)(39840400002)(39410400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(5660300001)(106466001)(105606002)(77096006)(54906002)(53936002)(478600001)(72206003)(110136004)(86362001)(6666003)(38730400002)(4326008)(47776003)(33646002)(1076002)(189998001)(76176999)(305945005)(6916009)(50466002)(85426001)(50986999)(356003)(2906002)(8936002)(5003940100001)(50226002)(2950100002)(81166006)(36756003)(8676002); DIR:OUT; SFP:1102; SCL:1; SRVR:CO1PR04MB553; H:milsmgep15.sandisk.com; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT033; 1:4SHzoxDQwxLYauAYJF+hH8sDcv1fThgodyOX14B6+2x9iHyxUqA3RYvI+0UXztXWMIshTQLqpDE5iKIqCoDTyeepdH+SWQEhk4FIwMNqfv2fvpZbfO6hxTa489rKk2vuBh3oRWVN6qdXeb4R94AR1KljsrNsgr/32lPnQX2XZidMcwLxhPn539eTHDZ/j7/W4mYSpaee83FfoG8wswG1D3JGorWunIitQonSWpKmiAbyjMakIU8MN2TGXdq6nTxqpqgWdT3NZJpZez/oZDGpWxlaaX6ubOqz01PiPKpdn0cPkfyjjsQ/KIzI1WByQld9lP5h915fckXu/gAJ5YKWvxzgE0FzxEKax9UofZ0ab0XSD6oiU0HE3+WGPoZqJzMIvovo37T92HKIcI2SHw7r4Tk1Nn+wHyTVfyzYmvImCedN35St8Af/uAhaVWcT6trmwQqkbQ9Vhf5cgrqTWNvF8grcSWMxFMljcur0gkvCxe5oJHzVjc9lL445NJZ+2MMjm8RV3K8fVpqTETVLgfnrAnmh5QqTWDYzUNb2ialaR4CCXH9wUf6YBsPou5z3jXKl X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a5ddc337-2ef2-496c-8d73-08d4b75fafb1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:CO1PR04MB553; X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB553; 3:yyZELQBdw4s3mIpE4sYA3uyBAKfaqXE1ThJ3apayDhW2AtFjPCUX96YthJphNZ+1P67dWAsCc6bO+8yVErlE9V7XXgwiNyeI36YUVK73c5xckwCD2tyCB54sZNVidqjIWwCc0JtyQeQ/RsVK6Au7koe8wbC+lL7d9XesBXSpWZwoOZ6hPGlZZDhUi6g/3UNvcZk833xRPVcWVs4dfMl1w/XQVBYLNQv0GUoW5jcbtmh9TBUlJUwMbaNRhqaXJUZGTI0ys6FjFVMmhMV7fl2OLFJ43DFVRRvD1ZUWkd/QWkukHKcA48MkvDawY5tGNTP0t/7GDwh2yLd6nHU2Md3KXilh+PQ4Q2Lg5r2CpEdL36srQUs/vOJWXmfi5/Vrm13ha4tHXYsQdsnC2lT1qwFXN9vK0IZFraU2GHa52Kpuqk3ajjarVeXjK8X5j7DYUwnukj5E35Wjrja6XsB4k5rObQ== X-MS-TrafficTypeDiagnostic: CO1PR04MB553: X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB553; 25:EtQRKQHaZwaG1Y8LnzNq7gV9EcmnWzWgrXhyB7qP/k+Eww694tODOnft2krSsRPeeY/PV8GOREPhnlW7uWPWjRJ/krgISUznYqOq1rGN8aP2pf86Tl4JB0tuk8yBjYgz1Iajla4fk1j4sZecqOTFoNgrBkL1Uts/TP4F4JcrTttd6x6WV0bahWTaFK09kos3UpUi0eWRcuqBiyct0K8ectOsiwhq4BOgjwjqnvbeG6VE4AJp1y1LvzxwQ62Srgyd5h/aKkHYlnLNmQBGhZYGq6Jga4/Z1Ary9WZX+Zr9MgGTaOvD+T/W8EV8Kl9d15I7uNzmt3s/SiG/fbF8ZSshhp+dYeMAXiNGb+ZD7iwFSW4ftmDEVCGOuftdabf+3a2PlKGKmZAPr8yNY0vwTS2uzyvUPm7+kzr34xgcutuf5CY6QNkhcdzrAuOgWi4M99uH7NEHOEdiOX1Ie/6pd/zJw8fqLJLPZqW0jrDJ+AaylU0=; 31:H7QRrrQb/s+lwdtVWYMX2Md2EqSlS3gmUH+8eEhBsPihI5FhE8ix7MXX8gRZzXISXzRayBwvKYoex7OJIrT0e3pZI5Y74NAro/Vemldsf2aJdM7w0UXKxySX1/Pa+b8EuH7ssxcs+rHfkHSRlHMpo8nCOO8sVjLRyn3Z7P2fLq8+Pxln+NGyawzk2nkcbscYNIBliNkFajNDkgbJEw1UvdS6SYUC1iXPzW1uczeYGgDdA+W2HdiL4spbKSDxZo5o WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB553; 20:imkY/YX5Gh0CQVqPrOFGbLrFEaFGtojhvYNKtXAwfkIeBa/iabLP6HuT6Tk2UMVPBGhjOAl99PCtPRKMoBoGFCZSfWCKkbMI1ndAAiW0cwPxkNmYc8RaPk72bSSDhVK83OY2+IPTMDwn1VukwjtfNx4kmTVhjR7yrF1uUptJIdsQi2I9oaBxvfFwq53iynF6ile6YB1bfTPIi50SVa2eqL0KBzheDa4Nv5HtkmME4JO5Y6+AOT5duCKvPoFnFdXF8wL9kq3YmsqlUsiQPPf83JUFGzxKmWBAmmmm8wAjk6/YX8rIdZ3A9I9NpXRfza1LGK3PDQ2106OC/QbomUlT3+nW1FJTaMv3Lc2KqKU2gke+/xKuKcBPa4s6fLdseiSWuO5M5xQzYILQU5s/fzbUm3or9fwoD01HpGKsKJ9zz52FW4aE7vm7JiwYFDVL170Q34q0/MCfrLUubNFPpKu1Q51DIAr3YJDsHBSuWooxwNRX/Eo7HdJAGlkBzM6mltC1 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(13016025)(5005006)(13018025)(93006095)(93003095)(3002001)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123560025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO1PR04MB553; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO1PR04MB553; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO1PR04MB553; 4:oqfMpkzNljNIMn+l+5csR5c9jjnSgLSgZsXd3e72/lf?= =?us-ascii?Q?PyzHP4WcNBsdMyilNBGUjizlfQLbupAHQs+YAIVbu8plTNlxBy6WpoZL/H2+?= =?us-ascii?Q?tHjo8YjnIaKDkdcpEOaeomvayXdZyZPjofNzQ/9NGouVVrlV+fGWeL1CpV24?= =?us-ascii?Q?7+CQbQ3tzb0HyaBZio6TRuwZk7oK2me+juyiD1jlq8bt7n6GnhcOiCVNE2WY?= =?us-ascii?Q?tvmrMpEc5IYoZbqUrxK5RDmKzk1CU59JQGU/x7F0mUH+1Kegh6B5ffwrJEKN?= =?us-ascii?Q?1IZEUijbjHg/gkThfsXHSZCAM/UWZ5tnNhayaPMATZRlSsnWGywuX/SKCMZM?= =?us-ascii?Q?B2+sq87S7BI79wi+yR0dBPqGQpUV/rPhlBLSTp/C87sHWUpEM/TKpK53m/N2?= =?us-ascii?Q?mUBQxsZ0oI2AuAYPHyZCr9yaLPjobSA1+eSRKyHf/0LfvMhLAjy+qRmCZyDn?= =?us-ascii?Q?A+GmNE+a00LJeVMQvQwwQ6Dy9jV97lILhX7RgceA2MUc0yRbzJifhyLBTXEI?= =?us-ascii?Q?60bJkYO8ofD5e4W896cl45xU5iDuazaKGpHWi1cvoeyjOYLvtdFLvReMEwyo?= =?us-ascii?Q?npadwuZYz73qS5V8Z16BCmhjUzY7q6sYIB0jn7xwJLlkMkehuxlUrlFiNXuq?= =?us-ascii?Q?k9//2VN4FsALu0tIeg5dxrVJjlFtz9rk+nvT022nxNTEZGprn02DfNzEgQlD?= =?us-ascii?Q?4sRhayhV33v4bqj0aSV0geBOGIzHzlwDs+tVbIgpORXIIRcieddjMxkkN82d?= =?us-ascii?Q?C4EVIXASS9dLChQ1MMXL3C4DxdaN65rblQ8ibNHYvFWP57SdXNjIQa9BjSkW?= =?us-ascii?Q?kkOGB5EUE+6pr+rOQHF0TzoBvsfXGMUm+YDnB8jVX2+WVEqCopqC9N89DuMv?= =?us-ascii?Q?mQRiYgTXR65GhdByCzJngQDuQYVdU7slzwpeig07V2STZsfHHURGkFjpMBBG?= =?us-ascii?Q?HmtHxTa6u5qJJpGsAh5QUS4ml7wr4DaWWZx4bfxPZumLiX41OcD9RhkS4TqB?= =?us-ascii?Q?sfrG2L5x3KTjvAu+y1VWD5r1Y76B+KHY0C8oKEzPP5Y5bfGHx2ZH6j+HgSf8?= =?us-ascii?Q?OCYvP7u3+fqjZxTkdtUfn8qC3vpPk/Wyi1AB7P5zvrwhQrqVRXBQqCN7b65n?= =?us-ascii?Q?GeGbRDmgA0ady0yG87INer7hsnpXNDhqres9XXkofvejFHhmmtANRn2S0ACR?= =?us-ascii?Q?HLamMbMtnaClVqsITfGEHjsg6knCXmhnp0cUEKLb1WslVUPiNPfwMw/OMgVf?= =?us-ascii?Q?BoFKmLMKM2BuIy6M/KPbmtzPDQ+Ep75TGOato?= X-Forefront-PRVS: 0343AC1D30 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO1PR04MB553; 23:cfqt4cNgmBADzBkt2vPt/Y2tcMrqZ0UNh3Asl8DNcA?= =?us-ascii?Q?2ZyLWbVnxgJudiVdXAehBYVBWqfzpTkLgPojj9HP8TvNQ9O6xpjB3RpRfTms?= =?us-ascii?Q?0wwo0+SjFX1dIciboLnUlK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FZ763VGWex8RWLpou0mo0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB553; 7:IJdY5wdLVzBBrLfALNxtGcVT456Hokft+7ukxFlNKxETPXKoEBhnLRVaIsynH23pKTcpSchCY2ZbQdG9hdBZxhrUUBXfvAdRbDLfmpeZF5gGfuw/qqJGPGWJl6Is8ZyR7SH0dH6XQGHel3FEj81CS4pLELn+GhDVHTomDU2nXaoIGN2sfMiuJZcYooOMxqePkv0Ks/XBGdejOZIZrnZMczzl18rl3n6r+obGIFspv6MUFvbUgpTH5gkhH4OJicKhtcR+xCAYZK3r/fVjon7rIPhIweg4D9KV35tJRjUuGQFPtTTxxdU/f5WgjTR7rTkFUpaoTPQ1wqiZvxkJ82X2KuybgYzNbkYtPsATLPj3ggxYP+W9euG85ZNjjzfTXSvnPTOthJPmm+CZ5FmK8jqePZYkUb+7zktcW5bNT+GFh/fv+1+LvergDQRbapKwamKLqJyeAlP6JINcFaaSAbReTpMoF5cOS1pdUKSjbQLXUiTZyz2LhCYmqHF1eP/AToAV2lmPfD6U9lYPpAVKpAhjvBM7fudmbPj8+/3mnMTA+nP43O2yFomZMMCkKajraLppLfnORkSXzUEZQrtPDPSBDkA5E5RZADBIahQ6xizC7fEgtsiX2mupIUJ7VShVTqoJfozJKE5whcMzHswMotva4+u7b0nnDZFx2ZyNZBLIs+GI59Zaz7YCw99nsGCrb9UeWiu+OOKPRXFbkgQK6R+Imu+wl8FMjxrqLs9HLFjmvzZz1FfHxhvruiKXRLdr3/KXqglScFrM5yNsSU8UMvCiSQ0+pqu4fjtedXBsCpm8GSs= X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB553; 20:4bnaqNydTE0GdJIJvGC/dttipl++qO5fmTH5KPV7PQDKCQyB+Pdp+EAWnX+RlaCspg9kDtVcizlpoNickUMlCqt3anKmbFMc3EHNmviJot3sTzCBnMkXd5hAdEu+x9h2FQ1Ks+7N7svXtB6q8Cts/LnJR6eEAB48qQimpvJTcJc= X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 22:08:15.9601 (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: CO1PR04MB553 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 From: Bart Van Assche 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. This does not only help block driver authors but will also make it easier to remove the blk-sq code once that code is declared obsolete. Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Ming Lei Reviewed-by: Hannes Reinecke --- block/blk-core.c | 33 +++++++++++++++++++++++++++++++++ block/blk.h | 2 ++ 2 files changed, 35 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index 5eeca5ac547f..4e970a90ba5f 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -240,6 +240,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, @@ -259,6 +260,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); @@ -278,6 +280,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); @@ -301,6 +304,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); @@ -355,6 +359,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; @@ -382,6 +387,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; @@ -406,6 +412,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); @@ -424,6 +431,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); @@ -452,6 +461,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; @@ -530,6 +540,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); @@ -556,6 +568,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) { @@ -953,6 +968,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; @@ -1090,6 +1107,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); @@ -1328,6 +1347,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: @@ -1367,6 +1387,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); @@ -1422,6 +1444,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); @@ -2481,6 +2504,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) { @@ -2601,6 +2625,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); @@ -2632,6 +2657,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) @@ -2783,6 +2809,7 @@ void blk_finish_request(struct request *req, blk_status_t 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); @@ -2837,6 +2864,8 @@ static bool blk_end_bidi_request(struct request *rq, blk_status_t 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; @@ -2866,6 +2895,7 @@ static bool __blk_end_bidi_request(struct request *rq, blk_status_t 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; @@ -2892,6 +2922,7 @@ static bool __blk_end_bidi_request(struct request *rq, blk_status_t error, bool blk_end_request(struct request *rq, blk_status_t 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); @@ -2934,6 +2965,7 @@ bool __blk_end_request(struct request *rq, blk_status_t 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); } @@ -2953,6 +2985,7 @@ void __blk_end_request_all(struct request *rq, blk_status_t 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); diff --git a/block/blk.h b/block/blk.h index 83c8e1100525..798691a5e5e9 100644 --- a/block/blk.h +++ b/block/blk.h @@ -143,6 +143,8 @@ static inline struct request *__elv_next_request(struct request_queue *q) struct request *rq; struct blk_flush_queue *fq = blk_get_flush_queue(q, NULL); + WARN_ON_ONCE(q->mq_ops); + while (1) { if (!list_empty(&q->queue_head)) { rq = list_entry_rq(q->queue_head.next);