From patchwork Tue Jun 20 18:15:46 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: 9800091 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 4EF5F600C5 for ; Tue, 20 Jun 2017 18:43:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DF3A204BA for ; Tue, 20 Jun 2017 18:43:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 426B9206AC; Tue, 20 Jun 2017 18:43:53 +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 6D84B204BA for ; Tue, 20 Jun 2017 18:43:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751133AbdFTSnw (ORCPT ); Tue, 20 Jun 2017 14:43:52 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:55003 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751131AbdFTSnu (ORCPT ); Tue, 20 Jun 2017 14:43:50 -0400 X-IronPort-AV: E=Sophos;i="5.39,364,1493654400"; d="scan'208";a="27857710" Received: from mail-dm3nam03lp0024.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([207.46.163.24]) by ob1.hgst.iphmx.com with ESMTP; 21 Jun 2017 02:16:05 +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=MB0Py3aDxzLmt+JloWwWwFNndXOir98FeSIKYwwMbvI=; b=YVCi5hZm9azutR9BP4xnXQdneXB7mTi4obo0qCMN0w8uuRDBtoh1+1YvVvrKVZfaUrVyK6vuUqcIA2Oc1vj2UFkIGDmDMVvIX4GDxXS5Gl1/vVJJum/W96/MtP2lDOSc2wb2QOTzg1T5BaE0ZykwrJMHEeD++ydM0lpTMxPQKEg= Received: from DM5PR04CA0040.namprd04.prod.outlook.com (10.171.152.154) by BLUPR04MB532.namprd04.prod.outlook.com (10.141.29.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Tue, 20 Jun 2017 18:16:01 +0000 Received: from SN1NAM04FT052.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::208) by DM5PR04CA0040.outlook.office365.com (2603:10b6:3:12b::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15 via Frontend Transport; Tue, 20 Jun 2017 18:16:00 +0000 Authentication-Results: spf=fail (sender IP is 63.163.107.225) smtp.mailfrom=wdc.com; kernel.dk; dkim=none (message not signed) header.d=none; kernel.dk; dmarc=none action=none header.from=wdc.com; Received-SPF: Fail (protection.outlook.com: domain of wdc.com does not designate 63.163.107.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by SN1NAM04FT052.mail.protection.outlook.com (10.152.89.62) 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; Tue, 20 Jun 2017 18:15:59 +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 16.50.03809.E5669495; Tue, 20 Jun 2017 11:15:58 -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, 20 Jun 2017 11:15:13 -0700 X-AuditID: 0ac94371-10e5898000000ee1-5c-5949665e3a90 Received: from exp-402881.sandisk.com.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 84.5D.11415.85669495; Tue, 20 Jun 2017 11:15:52 -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 v5 09/12] block: Document what queue type each function is intended for Date: Tue, 20 Jun 2017 11:15:46 -0700 Message-ID: <20170620181549.24903-10-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170620181549.24903-1-bart.vanassche@wdc.com> References: <20170620181549.24903-1-bart.vanassche@wdc.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrFLMWRmVeSWpSXmKPExsXCddJ5kW5cmmekwe1mVYvVd/vZLBa82ctm sXL1USaLvbe0LQ5NbmayOHzvKosDm8fE5nfsHpfPlnrsvtnA5vF+31U2j/VbrrJ4fN4kF8AW xWWTkpqTWZZapG+XwJVxaNU/5oKddhVrN09gbWCcb9LFyMkhIWAicbmvj6WLkYtDSGApk8T0 q11sEM42RokpL/8xwVRN/7SbHSKxnFFi9403jCAJNgE9iVPz9oEViQgoSPT8XgnWzSzQxCTR MuEHWJGwQLjEpc5ZrCA2i4CqxKxDN5hBbF4BG4mbs5ewQWyQl5j2rheshhMo/n7JaRYQW0jA WuLr9/tgQyUENrFKzG0+ywrRLChxcuYTsCJmAQmJgy9eMEM0KEucX/uEbQKj0CwkZbOQlC1g ZFrFKJabmVOcm55aYGiiV5yYl5JZnK2XnJ+7iRESA4U7GF/f9j7EKMDBqMTDG6HsGSnEmlhW XJl7iFGCg1lJhFcuDijEm5JYWZValB9fVJqTWnyIUZqDRUmcN0t2aoSQQHpiSWp2ampBahFM lomDU6qBMXU6z6Fzlup97jM0N+VZtjxhUTDIvb4op2D+/MfTmX68O7zlUnPsy+sFe6f7aU+5 l3FofU+14rHkC6nXj22cVvj/0moedf2frFNPqXQ38gYvL9uv8v7Kko55Z8X/HjeYUnTz4xRL Oavb2Rpzf7A/qL7pYex5R5up1mTp4suvb57tiRZnapJ3llFiKc5INNRiLipOBABPi1u3fQIA AA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMJMWRmVeSWpSXmKPExsXCtZGTTTcizTPS4M9ha4vVd/vZLA7+bGO0 uPTnC6PFgjd72SxWrj7KZLH3lrbFocnNTBaH711lceDwmNj8jt3j8tlSj903G9g83u+7yuYx bc15Jo/1W66yeHzeJOfRfqCbKYAjissmJTUnsyy1SN8ugSvj0Kp/zAU77SrWbp7A2sA436SL kZNDQsBEYvqn3exdjFwcQgJLGSVWnGtjBUmwCehJnJq3jwnEFhFQkOj5vZINpIhZoIVJYs+6 U+wgCWGBcIlLnbPAGlgEVCVmHbrBDGLzCthIzJy6mw1ig7zEtHe9YDWcQPH3S06zgNhCAtYS X7/fZ5vAyL2AkWEVo1huZk5xbnpmgaGhXnFiXkpmcbZecn7uJkZIMEXuYHw60fwQIxMHp1QD Y5furCULcp7JMs4907vybsOz49dMolckzY8q5L67dE/JTPfm1rUde9bEXrnxe+EruS+Mk5sO vfy8rWDitb8PzHs/CnyQn/NfVVx4evPdo6U9S//nte6wKQ+433d7frjryyybJZvmvcxjninz f3aBW3RPnodGLAP7w7Zah1sZT+8quRj2vlmwPECJpTgj0VCLuag4EQBXPgdD1gEAAA== MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(39840400002)(39850400002)(39400400002)(39410400002)(39450400003)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(9170700003)(105606002)(2906002)(50986999)(54906002)(5003940100001)(76176999)(38730400002)(110136004)(106466001)(6916009)(478600001)(53936002)(4326008)(33646002)(72206003)(36756003)(8936002)(50226002)(86362001)(2950100002)(8676002)(85426001)(356003)(81166006)(6666003)(189998001)(47776003)(5660300001)(1076002)(50466002)(305945005)(77096006); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR04MB532; H:milsmgep14.sandisk.com; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT052; 1:VCHUF1sDRBejG3J0q+eejeYlNKI0/L4E+XwGHiZf0aPBtrzzJaS2EcGDlgIU7E0RRfn3ULLJx8txXjeHatW5Y4liAw3I4GEQIMa2nwcV838uHohzHGJYowP8av1tKdi5O2Fe6RoE8geBgzPNOZtOAEFmCcWG0XK46WJPYnnx6W1LktgPycXssa0xpaPtfdYXhBUtUuOv39+GzGRTWWTd+mGIWXCf/zLoRUrr9+1acvFsCv9fu353QgVLajXBULfzJ4yoH4kwjOmft+Wqagak+8LoBNddcNGhyinqF7V7FOPWQ9nnYYibZKKxZa//MfPe/nNhWZtAXvGor2srm6RL7lRn0D9Em1EpyUAuJXnqSAmUTXZyjvfbpGCNFMZGPofz0DOcM8bpSdPfrzX1YD1p3eZJXd61K9j53bsQaj7c27Hqii+S7c+0FAJ3UC2rc6YQwOK8igThKzimAB3bdo1VOWrLxf3meR4EA0ckcUpuI8Xm5VKki0aFupUyaTTlvJy0wCqPBe38156KNmGYKDym+jZ+cBnK4EEkEU+PXYv9VWrg/IDPjNzt6TxoSqxt8BGciWXtRJOxu8BwTaLh4DgCbYinBP05LukQQVVN7OFA2QIy/7uOc5oBPSaFc5Um5I+fB9KTYVcXzXRB0MT2SCZwF4I8uOjGaNS/5mHAoq3QOC5yuNduXK/JGU/EgxNYYu0vP1bAdbN/aqyX/ojAoTZo8ur3tC6pnJaN/s79DcA3kZOivl8GBi1XZ8i+HgTG1ToOXXrLKx9LBURc52jsuu5F8wJPF2Ckq+bON3COJlaSMduvklYGQUzotAeQLHbGX/RDHZ0kAAFWGxldSvC/2MewgvmsCCvuIvEKxc68Jh6xcYO8fuY7Bcvl56eWSCglJezA X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c98e6f73-6b8f-4df4-b203-08d4b80867a7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:BLUPR04MB532; X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB532; 3:1Rx+6reUnQ/IfVu0e0Ghsq3rOhyd5sE7BZqQDvt91NZ5UsCMC6JhQZ8oYKaI2hgJ4WPVY4DJpkI6b5S0q+akZDRVxH5LS+DHCt3gey2vScyYdwquusqPyomwBfvUQzHEGpRd1KCJUv8BosmO+tWVRS2nPv47k262rWQb2eIlt7KUcygqcNi/c+IwHAwGtzWpKqDepAbyHMoCW8y4kHtZKqD+9W6MQTDPrPNxicp64yw/q5ljnSMuxKvg4l0h6CNi4GZpYo/uJmaqfey6fWjcMMX9YmvVRWmG2nVJ8oc44B+FtUItezI5mgDdSXEK5RYbZwmDj2+Qg7i7I8jdWPvGANBfSQiR8utdbo11z8HeIQl6+1B8Z0rWR2h29w285RCy//Pq9KVnIqFJUuGcRYoUPdxRZR32KdSBMldgJ5EaNqkC5Z1ns1W6c+ixS9CVsdgaSqdJPNNvu+CY2Vur+v+7Kt0y3qomB0qFQYaFceux7/0= X-MS-TrafficTypeDiagnostic: BLUPR04MB532: X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB532; 25:etgaPFVQWEVCE/kql+MXHe19OgtIFfL4ZdOCSw8zy5e4ugQBxnsn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ciFwM8SOJSkp5sSEjCW9nKD6pOllLmu5vi0rHWgHoHi2/xK0icjQUgJcY99+Aw83w1N8NnhMzezX7wqRZsp9zXSiwrnHhP+xk1EJqDaWjGsxsxz3XieWVTEA/Yk0TtVa3K37vZHa6f13+5q+noQpoPefe47wjUaPGyP86emWrfM2S+riaHbYc//o9nzUl0gb20x 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)(13018025)(8121501046)(5005006)(13016025)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93003095)(6055026)(6041248)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR04MB532; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR04MB532; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR04MB532; 4:PsBiXVUy1CRTxv13S0uHqq9xMszAuanK9G4ZVtWbuDY?= =?us-ascii?Q?UITVgR+RLKzcnh7orGxjbzHrkub/gVd9Tuzmwl47w03CpoHK5BcN67ASKXhQ?= =?us-ascii?Q?eY6rDddSTYM3sJ0iYbT3LWumzbPWMVs5waUXWHBoBOfcyb9laibUw97H1hAj?= =?us-ascii?Q?wUjUH/RXv6mUrXTAellgXTBHaf/YSnJM5oJB9NdAkBTSJsn4kzJ5CqW7ET4F?= =?us-ascii?Q?cZKep8FJrVpG+FOO/b03nuYyJCrelXERA7S6DMeGh4Wt7bKC3KcWXqLC8MlQ?= =?us-ascii?Q?ayOYpNd3l0rJSo6IhFXB+6YELMZKKH8zO3orU9Xype/gp9ek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XxjPSz4hiOYpINssYrU+MH4LraACWW?= =?us-ascii?Q?Zi0owLLc4nWk/rDBCSwOFMd7ekING5xh2e96A4tWO6tZKuiYoRyFkZUkqi7S?= =?us-ascii?Q?puyhSnEz/cs+694JXBelYzOBZ2l7CBj1CFu4lMgMwHgIhKZv0A/ZAetde8y2?= =?us-ascii?Q?x2qjCuYNFO2HRN/OsFpbqC4/X7kk/TQrWjsLiJFP+V3Q6iN5Ls7sd2P3GFtP?= =?us-ascii?Q?CH5aAjwhk7+PqAO6+Kkco6SzyOWkrCoI8W9uO5zm9NOXcwxp0udypKvuIGgh?= =?us-ascii?Q?wn3h9/rf9B6F3HuKj8P+l81wGRmj+Ip99/neexHLqA20HWFKyct0mYva4AbL?= =?us-ascii?Q?oPyLbYwb80zlvRcXAcSQZ+7fCtZFABIsAUMu1LcPlAoOod+KsK2cJeiUZ2s4?= =?us-ascii?Q?svqEoWb4kKkjNS+voVDgF1b1qzSFKb6UtNr4HqUA0uIx6RHGUeEg=3D=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR04MB532; 6:OfwUPhEBQK+tvcU8SeH0naUukbpTsijg9K1mfz+IDlG?= =?us-ascii?Q?4VMKRkznNKlbYi0bMG6QpfW5peMYKssfdJzyyK2VSW0YtbmqMoEDGspfVYJt?= =?us-ascii?Q?JjdKdVIY/uDW65jxSj13WsMu8Q85R8TSh2eqF66iCQ1Z5fZNuxTwbfCFsgle?= =?us-ascii?Q?hftDvvVReLCA7L7KBuGW7DUWrru9bPzxNtYjn5J5/xg8pET1M+Zuv2gL28J2?= =?us-ascii?Q?v4Ir2t70GKnh4cb+EHs52lzr7SmGXawqecHh8zO9REg2YIJx3hBQB2gCpMby?= =?us-ascii?Q?Mo5oSdoNCYlwdrypWKFPfsU8hXglj4+BE2afgvq2tz+qXbVYZSbwinYmFsdg?= =?us-ascii?Q?HgFmcY1g2gCyuHZKU4C+hcoYdcAK+a/F38YJ5caZouIWoMYxfvROl/R+DZoD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5+hyhL3DNdBeZL1XTZfqEayOrjmBCvOseb++5f0sGOECytopLDCNRTYwHKscQI0TCFB7iZECvQ/lNHGhd+8koy5RmoKc7LX5iuMlPIogUD+eotcwaxG71BZ/cdfPqg4rjrWZNmah4iMJVq4Ts+V9WmL/WGY1l0= X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB532; 20:DVIps0c5/Aft2TOSpTbWlBRNlJs+LJ7BI/NIUPSjU434Sz0YSYDqRWjNcwe40gSrPxmqWfUCSZE3CAnACqq5L9oulT8vexnkqrSetpJRpBzc8kuyExjn14BK5Rmg+QhJ2HB9AY4xBNRplQjcfmYHBdQNzk+pGlAiptTluYuqxRw= X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2017 18:15:59.9062 (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.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR04MB532 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 5f87788249ce..2e02314ea331 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -241,6 +241,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, @@ -260,6 +261,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); @@ -279,6 +281,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); @@ -302,6 +305,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); @@ -356,6 +360,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; @@ -383,6 +388,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; @@ -407,6 +413,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); @@ -425,6 +432,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); @@ -453,6 +462,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; @@ -531,6 +541,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); @@ -557,6 +569,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) { @@ -954,6 +969,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; @@ -1091,6 +1108,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); @@ -1329,6 +1348,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: @@ -1373,6 +1393,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); @@ -1424,6 +1446,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); @@ -2495,6 +2518,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) { @@ -2615,6 +2639,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); @@ -2646,6 +2671,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) @@ -2797,6 +2823,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); @@ -2851,6 +2878,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; @@ -2880,6 +2909,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; @@ -2906,6 +2936,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); @@ -2948,6 +2979,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); } @@ -2967,6 +2999,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);