From patchwork Thu Jun 8 17:33:52 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: 9776167 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 86E24603B4 for ; Thu, 8 Jun 2017 17:34:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E9C22521E for ; Thu, 8 Jun 2017 17:34:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6337726E4D; Thu, 8 Jun 2017 17:34:41 +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 3AF9D27031 for ; Thu, 8 Jun 2017 17:34:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751552AbdFHReh (ORCPT ); Thu, 8 Jun 2017 13:34:37 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:19082 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751439AbdFHRed (ORCPT ); Thu, 8 Jun 2017 13:34:33 -0400 X-IronPort-AV: E=Sophos;i="5.39,315,1493654400"; d="scan'208";a="126519571" Received: from mail-co1nam03lp0022.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) ([216.32.181.22]) by ob1.hgst.iphmx.com with ESMTP; 09 Jun 2017 01:34:05 +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=gBAW7Utqt9tqUFgQiaRV65njF2ko2HKZ1SVoXA0LWXY=; b=HmB+P9sEwKpdCQdSrfvQUfGk7aJOLP28nXzzjZjkqzZo4cHnQ/zHcI6PXa0pGWayJPWCACVimVy1WfC12rY/WZ/uB5PYFQ2kTQGIH+6hgeJLmCLZCUhD3U2lCnS991PXJlpH0CgTl+YmI97D+yphhbGYauWpOaXOyPyvr/coUyo= Received: from CY4PR04CA0039.namprd04.prod.outlook.com (10.172.133.25) by DM5PR04MB0413.namprd04.prod.outlook.com (10.173.169.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Thu, 8 Jun 2017 17:34:03 +0000 Received: from SN1NAM04FT057.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::209) by CY4PR04CA0039.outlook.office365.com (2603:10b6:903:c6::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12 via Frontend Transport; Thu, 8 Jun 2017 17:34:03 +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 SN1NAM04FT057.mail.protection.outlook.com (10.152.89.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1143.11 via Frontend Transport; Thu, 8 Jun 2017 17:34:03 +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 0F.59.51736.98A89395; Thu, 8 Jun 2017 10:34:01 -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; Thu, 8 Jun 2017 10:33:58 -0700 X-AuditID: 0ac94369-6dc8f9800000ca18-0a-59398a8990a2 Received: from exp-402881.sandisk.com.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id CC.E7.18148.68A89395; Thu, 8 Jun 2017 10:33:58 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Christoph Hellwig , "Bart Van Assche" , Hannes Reinecke , "Omar Sandoval" , Ming Lei Subject: [PATCH v3 09/12] block: Document what queue type each function is intended for Date: Thu, 8 Jun 2017 10:33:52 -0700 Message-ID: <20170608173355.25898-10-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170608173355.25898-1-bart.vanassche@sandisk.com> References: <20170608173355.25898-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrJLMWRmVeSWpSXmKPExsXCddJ5kW5nl2WkwZNZMhar7/azWSx4s5fN YuXqo0wWe29pWxya3MxkcfjeVRYHNo+Jze/YPS6fLfXYfbOBzeP9vqtsHuu3XGXx+LxJLoAt issmJTUnsyy1SN8ugSvj3PYHbAUvbSsmrPjK3MB4w7iLkZNDQsBEYv62jUxdjFwcQgJLmSSu P2hjBEkICWxllLh+OBam6Mrv7SwQRcsZJZ7O6GQFSbAJGEl8ez+TBcQWEVCQ6Pm9kg2kiFng CqPE2svf2UASwgLhEl/ubAabyiKgInFm6jywZl4BB4l5m86wQWyQlzi7ZScziM0JFL+2cwkb xBX2EnsbvoMNlRBYxCpx8PIzFoh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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)(39840400002)(39850400002)(39860400002)(39400400002)(39450400003)(39410400002)(2980300002)(438002)(189002)(199003)(9170700003)(1076002)(50226002)(5660300001)(76176999)(5003940100001)(50986999)(77096006)(6666003)(54906002)(38730400002)(305945005)(189998001)(86362001)(2950100002)(478600001)(2906002)(47776003)(72206003)(4326008)(36756003)(110136004)(48376002)(53936002)(8676002)(81166006)(33646002)(8936002)(356003)(6916009); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR04MB0413; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT057; 1:dGwPxThGbT5bN83xdegCFoVfrQHUVs7SM+7qbOKnzKxtMOra3Gys5bX1hTXvAIlT3gYL2/PrFmlyREm4KEu8ksK7eRhMj2ijQItu5vUmgoClXAw/SGTdo+9lgSCjPh27U5Ql1vizTUd0EkK/TELfAzGcLZit3usLkFj2jobfBq5aoyMGfoC4pkaxonPCFRfLurbUS1QGtZzdeEeNUPBhn26MAr1sKND47MYP4a+BiiuWvJeKRjdjVeXEKyGD58bWUl4Xyw4pBgwbVEhjC/ANtlMQ+9VT5SSPmitgKOi3sMu3icJ3mK0eNi3ohBxmoXMseb1e7kXE8/1VzIXddh0IZZkdReWcLCZ+Jl2rVF3UwV2TLqg/uhCIXj+eqwf7rQy2Cbp1FP+czZK+aHAKnF6CgckRQdvSHYzuho0TvQB6NfTxJMJc74hkgr44BdbUNRUZJeO09cHoUOjOUArb+iC0EpqjaGIG2RW07JDneaWrRyQ6oVs6qQlSkHYCaFV6h42Zslql8YghKyKa3vDlOkUxgCS2cS1dOUAdqLnAU3A5MF8lK8qM9xP+gTo/CqGEg6hz X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR04MB0413: X-MS-Office365-Filtering-Correlation-Id: 97f02d92-96aa-4187-d833-08d4ae948e86 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:DM5PR04MB0413; X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0413; 3:Ztrx8utFyC3z/8DBRN2wahIBVqYXbbi89pKNymcfQkXbaBSiSbaljBQpMBU6iT0xWVGGQjVXmwIbEEtSp4KAl9OJf5ZUAQ68jhl1VqktPP3aiR69Uc6JoVhjAmSnucosg/MTRVTmogOvJ+I4WsaIsZRHSdlwz2UgKZmzAPBYwCNFS7IL2tFRDrjEPuu7Beesek6hxjXfY/1aAHb081S2HfQyBuXP01HARA5EFNdNPb8PJYRzTnUObkXSbHQySRJUthSeGals/ei2eTwqNazqICUZXTgImXR/fr0s0ZoFg4loRKneDaZgDjz97lxZlltte4ek+QsCaN22W6t9DLJJ2ZHDCSs20araqCKFhDL31cErDN9vIv/HU5Ee3XL9fJTWn6ooRvP80V4p17BIZkgMQFEES5AXw1qkoN8p69MJw0fEtOJ1/cUnKVW+vxeXnYamVNMjCwjfNAYWWk80HoEGLyLGdh+Uz89aOchmDXZl6bIkjis9kM9WKbx1RyeSA7NA X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0413; 25:N/ktNFZW8vZb5icrJT/WK+HaA8rXMvRtmW3+auVBxalV4FRxRe5oJcTSDV6Pw3xq5v2bfDSrByxUq92x/ycbFXFjyyNv665aEcsBANzMmyFrJz/le7D+1qL6K4SQiciKh6/FUDDOrlodvSx1XJlQoTaA38ZQHnjdqPZNrBUqfyEwH8jMyExCU+n5Y6hTaspcRVxCm7rnwIUZjLzoFajJA9DcuqARke4Hz2iqtvT9l1hr+iA8lVHa5aQ3LlK3NnOsVD5KB4kUiX6Ugbe1nETtUQxfAli6Z9k0mNqay/PYyO4q6qEsENlDzL5jnH3Q3E07hOLlSkrXEwnogQLlbDAPiaP0UjscRu+6znMkV4as+V2mhM9kI4M8WItC5dv5M6rsfHNj6i6+av5dmz1hm/J53XsLzZMSJXt/YMqST+Sr2eFPVzLwUxg3tZLx6FlfvC4ZzzXpCLpZStaBEWDS9YkX9WYGeni79rofd3h4Ol4erj8=; 31:TPvk217RwEIp0mV74JEZDc7lxsu2fG37EY2viyR7R3YfE6vC9GmPE2fc9yPGUrL7f08ldR04i7qGt+GohadUU0uTQjP7OcSNJFgyph+Ok6kKgmCy1lzZk7L16xZU0zfZup5It1X/bMGpfkm0hnyWaJLnQ80sK7k4a874UfEIUGSxIVZ7KRsJMN3649BHl6lv5Dl41qnGEuL6njcpPq9D8cICtjaGijEoizphjEsSM/FQ6aRdQkbhdMX6xoydr3SwXeEkr0JY6FqWmtgXdZYUkw== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0413; 20:mWYVyKHRl1BvmokjJ4byg6cLLCQMlrfvG9ruxMcuUDevUlwOeQ06MKiguVtq54q49l0wMebibdHkmgId10r4CiB3c0gUSHG5I2NSakNZu7XLJMUfYpwnru6RewU5OGuYtkRyvk6acVAq9c72MFj/e/XeYyPgjO2mQ06hyS4jrDD5IeV8kBQ7ySKL4oEuITldhGgeAy5ngFahSPB4zYdpwu8S/YDiNSgB/kON+rxiWp1dHElP7qjpCdPTtX4ZE6v1CjAhVnJaXoaP9GV4kX4KnnJ4YKdaAWOAW17zEA+z9RuEb4v+YaAHTPx2pFdp/d4Hin/dX6N8KYhlsN8Xm4QByHAVTZ8Tr86htxZ2VGt9h7EdTxKa4wvDQCRDD2fqX7hEZbRgutS0A3F8PZ3XFJ7JSiSkwMmh7MtbDIFc15Suz/CqkqWywRciY6qgRUta0p63RTjbZc4GHg+lHP5o5LZYkC1t9o6Lmu8TNwEu6xgOGoQdlPFcT6kWI2PEGrv82T3g 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)(5005006)(13018025)(13016025)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93004095)(6055026)(6041248)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR04MB0413; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR04MB0413; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR04MB0413; 4:6+QvKj/GRtZYnGS0rMrt78D+0nKQ8H7BtUQqcXUjlf?= =?us-ascii?Q?Mmj8h/QLKlAEJEVdzQLEBgU72RT+UAJ8i4rkX4Ed4EGdycc6ROg5OKNmG5Mw?= =?us-ascii?Q?cP20D2PyZsdbOcYJc7W84am4YgCvVVWvZ1jZIYQU9TzvQZEPDMeul0Kvvk3N?= =?us-ascii?Q?dzU/JSIsUbJLbVM4xaiwsBwa/OUxj6yaGT4qnwAR1UVk+gmOE4b6GaN3tQPR?= =?us-ascii?Q?C8Tt/cS/8ifnicizQgGhLpZvTNvJ9r2tqzwaZl4C5EegzFtMXp6uzyNJAMR8?= =?us-ascii?Q?rhXJfV6wVvyD3W6fpiS8NIsD9nboUewwHOR9tOsDZdz3Gi7oUZjXsPLNdazv?= =?us-ascii?Q?Vq2O5+UYFzxG2JafInwNAyzZtF5M+hystqdXZSLgSNQUOeyc7xmpRPbe9Rhm?= =?us-ascii?Q?pxQECpdu4HtIB/XhlDhksPd0fSDuOkUGGIcs7o+KC6AcN1W3VYISaaxrBcx+?= =?us-ascii?Q?IuWgJ11pEZBYWAbqPqB7cnSFeS6jKf8JyqXwhCTHpMeiVgNSUZtNMJfs6fo4?= =?us-ascii?Q?HYwGj7NbC94t0DeTf+Pmf+6w0KKxRpfe53swTl5Hw6gKy3ABEEUkrJWbkKQ2?= =?us-ascii?Q?tEuc4bRxi77h2er3dFcPYTUSnPNs0VQSWpe9aokul+mVd4zRTahM+G/sjuEJ?= =?us-ascii?Q?EPIXTsy8IjVeE1k2Xh/nC2maTpW9HLM20ATCvSbynj3R0Jlq3ZXh+/Lp4Iwz?= =?us-ascii?Q?XNMZ9Cy3f2+bG57UNrYykNp6X8CMdAx8iURq9QqqFaNKik30pfGl51e5+xV8?= =?us-ascii?Q?FVQDpyQt+beBHvksPUPX39d89UkJc0Q7nebOH8/h7mXZEXLklwGFx0kQ2Ogd?= =?us-ascii?Q?YsFzN/skV7FZpKdMoLZs5WG3K7owRZ/utarpf4K79VqWtOJSVV211KR8F43c?= =?us-ascii?Q?vPTwgCua1dNiwisjOjuZLhD+SHFlCwl9atlOn2dTg0Je7R6PAhk8TRn7kugW?= =?us-ascii?Q?frC2OiE6Ea3Y6Fl1rEtNGJed2IiW5676XJhwarIAC5byF2DTZbFzSkhITlMg?= =?us-ascii?Q?h2EHESFxDC9ga3mH+yxioZpXyaJZjgK3JMHN2rBPn3J3Jgb82/vp8Pw/cQdy?= =?us-ascii?Q?HXWm6LMbaCYQXomDk1OnClU0RkrJFxKhsrRcN4avWnd88/zKI73RMBRUMwgm?= =?us-ascii?Q?oOkcyT/4ebC+8G3wfqHen2uoh1eIt/8vToMORe9MVsLwGO+PR8QcHE7Ov+3V?= =?us-ascii?Q?PQMf3/FmTIrq+oeFaoLb8QtzZrrjg8AdsT7T6xUnZ3c7bZHAypFKOhXdjbZm?= =?us-ascii?Q?TdzkK1pGQaeYEczzww0wS9cnVasB4lstf56QKvu0TRiUPEQIVxsGM2dvd7Jw?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0332AACBC3 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR04MB0413; 23:5zAqo4ns1RMTM/fC7VIoarJDK4pR3ePCO3YXlmcaw?= =?us-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wk0ru82FjS5/5KPLAGHnan8QxoXgewD8kfG3i/ODoT5/dIMjU7mFLoxG4jVtDBiT1UwYByHe8BN/+YuMSK45TVoE+JWWP13WIT2sEo/wUXgHVAemlNETuiv9rn4QgtC8WeFgQSvgIyNrmHlYhT/9pDUpnGuGCT+kDZQtcHmks/EwXA/smJpdR1KukM4TOT3yIqYfQeHMibJPODGbn8+ZB8GqgQjjFg/qKmnBDy82tVtsLPwvsiR1QRUaqI8M1svdEsXs0rDxAAT; 24:uZqDHoOvFnwwvPxIZXmFI8rIis0xbxiTjriftGtaHv28fiZnHKBRPAxJw19nOtZ0c33z+PKwXWouOXwPlcohYMJZGLjcCbrxXO6YzDHY/cM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0413; 7:x7zR7L9OLNstpAGdm+vGMOlVEQUXNkWyRPaFhetpSK3kJHaic4QbefNsEMAIg0GltP91YtFWqG4+OX9WCS50F7qN2SSGVv/lMx1ExVUwfhzE+zgghhcPRlGIlvr1v/mjDEAYnrpVT2Ynk9tlF4ftg4Hyj0uXSv9YmtEgVkMErNMZXznAQt3Su7khtNISSgR1FGy/ZV/feRJ+fqxw+1H3gfk3Hv3JuT1jlzJhsQfideWZ52aKq/lBtt0b/+4rGkLHzxuLBxG41j1guT/JVgiaXTBsBVso1OEbuZNapJpLLIxv7isWz0wH0nIiIYU4+8zxOWMv8EjALIYP44dAO7VwuA==; 20:idMQ82ZzhlxErwRaGzIAza6+VkL+v+1fraGPxsNayseCNmSV5mXVkFjtiOL4VMuAA9BklrwBmSd+6ioBW9bOc7JbbJVcGEktA5+HWnqhqlajRfuHTA2VDQ9NYvMgfaDC2cB9gIxD7Eat0M/QMP5pZHRofpz+lDj6rp3J8Pq99FQ= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2017 17:34:03.0052 (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: DM5PR04MB0413 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. 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 --- 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 6bbdce8b8b6f..ab4cb509c170 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); @@ -1364,6 +1386,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); @@ -2420,6 +2443,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) { @@ -2541,6 +2565,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); @@ -2572,6 +2597,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) @@ -2753,6 +2779,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); @@ -2807,6 +2834,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; @@ -2836,6 +2865,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; @@ -2861,6 +2891,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); @@ -2902,6 +2933,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); } @@ -2921,6 +2953,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); 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);