From patchwork Tue Jun 20 18:15:47 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: 9800061 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 43EA260328 for ; Tue, 20 Jun 2017 18:16:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46DF42624A for ; Tue, 20 Jun 2017 18:16:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AD032810E; Tue, 20 Jun 2017 18:16:12 +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 ACCD6281E1 for ; Tue, 20 Jun 2017 18:16:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751868AbdFTSQK (ORCPT ); Tue, 20 Jun 2017 14:16:10 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:65097 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751434AbdFTSQF (ORCPT ); Tue, 20 Jun 2017 14:16:05 -0400 X-IronPort-AV: E=Sophos;i="5.39,364,1493654400"; d="scan'208";a="28426664" 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=F1KOFC/tz9QoAcC0WTG5AszvR9MQLJLDpzxQTL4SSuA=; b=jlJbHtJef/lw+Pb8QSTKMmd1u6kIP3dAo0CEmItGjul51o7KtNw9cMYdR+cqEFiiT0msrL+OXLRdYohBqOuCowIl2IsmhlWkKoh4xmkT0S3PqujkjfihKwodF9yRHIA0PA4O8BBWIeSxLcXTZG5DoJUg+LeDt013GesVr1UqFZ8= Received: from MWHPR04CA0034.namprd04.prod.outlook.com (2603:10b6:300:ee::20) by DM2PR04MB559.namprd04.prod.outlook.com (2a01:111:e400:2430::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Tue, 20 Jun 2017 18:16:02 +0000 Received: from CO1NAM04FT064.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::202) 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.1178.14 via Frontend Transport; Tue, 20 Jun 2017 18:16:01 +0000 Authentication-Results: spf=fail (sender IP is 63.163.107.225) smtp.mailfrom=wdc.com; lst.de; dkim=none (message not signed) header.d=none;lst.de; 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 CO1NAM04FT064.mail.protection.outlook.com (10.152.91.144) 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:16:00 +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 C6.50.03809.F5669495; Tue, 20 Jun 2017 11:15:59 -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-5f-5949665f663d Received: from exp-402881.sandisk.com.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 15.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 10/12] blk-mq: Document locking assumptions Date: Tue, 20 Jun 2017 11:15:47 -0700 Message-ID: <20170620181549.24903-11-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+NgFnrJLMWRmVeSWpSXmKPExsXCddJ5kW58mmekwaa/fBar7/azWSx4s5fN YuXqo0wWe29pWxya3MxkcfjeVRYHNo+Jze/YPS6fLfXYfbOBzeP9vqtsHuu3XGXx+LxJLoAt issmJTUnsyy1SN8ugSvjVM8FxoJ1PBX/Ph1maWBcydXFyMEhIWAi0XG1tIuRi0NIYCmTxJ7v 31ggnG2MElNe/mPqYuQEK9qy4h4zRGI5o8TqwyfZQBJsAnoSp+btAysSEVCQ6Pm9kg2kiFmg iUmiZcIPRpCEsICdxLGtM9hBbBYBVYm72z6DNfMK2Ej0dC9lg9ggLzHtXS8riM0JFH+/5DQL iC0kYC3x9ft9sKESAutYJda+384I0SwocXLmE7AiZgEJiYMvXjBDNChLnF/7hG0Co9AsJGWz kJQtYGRaxSiWm5lTnJueWmBoolecmJeSWZytl5yfu4kREgGFOxhf3/Y+xCjAwajEwxuh7Bkp xJpYVlyZe4hRgoNZSYRXLg4oxJuSWFmVWpQfX1Sak1p8iFGag0VJnDdLdmqEkEB6Yklqdmpq QWoRTJaJg1OqgVGGa5719i+//p1Pe81hcHOPvOkkHeWioKwvt9k73I06H71I7qwzz6oxf/ag V5Mj+17i/r58x8JJXkkOs9uFA/TTu7JyQyVOP7GPb11uJvYmXFM36dhqHsmbprv6fy51kORZ mL6jjNVGOnx+oOaKqYxsT9rn3r5o92SFRbN7p+Q9+7udhZ+jlFiKMxINtZiLihMBMSNOz3wC AAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMJMWRmVeSWpSXmKPExsXCtZGTTTcizTPSYM8dG4vVd/vZLA7+bGO0 uPTnC6PFgjd72SxWrj7KZLH3lrbFocnNTBaH711lceDwmNj8jt3j8tlSj903G9g83u+7yuYx bc15Jo/1W66yeHzeJOfRfqCbKYAjissmJTUnsyy1SN8ugSvjVM8FxoJ1PBX/Ph1maWBcydXF yMkhIWAisWXFPeYuRi4OIYGljBLfuvYygSTYBPQkTs3bB2aLCChI9PxeyQZSxCzQwiSxZ90p dpCEsICdxLGtM8BsFgFVibvbPrOB2LwCNhJnP11jgdggLzHtXS8riM0JFH+/5DRYXEjAWuLr 9/tsExi5FzAyrGIUy83MKc5NzywwNNQrTsxLySzO1kvOz93ECAmmyB2MTyeaH2Jk4uCUamBc EOnSZSUfVL185zWl5b/kbxx2ij66+jXHAute4wP61k4Jb12MnE06ueysDJOUl1p92ao51WlB AKPdmzPn9PkmCLAUvIo0ta1+WZ43d9WMX3GJd2qij3C1qtZpqvM7rNl2IPxgnU6e2SqH0zp3 TifF1ilURF+cGvfw3gkV7fevQrfNOB/u16nEUpyRaKjFXFScCAC/D+P+1gEAAA== 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)(39450400003)(39400400002)(39410400002)(39860400002)(39840400002)(39850400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(9170700003)(6666003)(81166006)(33646002)(4326008)(110136004)(50466002)(36756003)(8936002)(54906002)(76176999)(2950100002)(86362001)(106466001)(72206003)(5003940100001)(105606002)(6916009)(8676002)(356003)(50986999)(478600001)(50226002)(38730400002)(53936002)(77096006)(5660300001)(1076002)(47776003)(2906002)(305945005)(189998001)(85426001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR04MB559; H:milsmgep14.sandisk.com; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT064; 1:2gr1qsUHeLdhpH8DGlFCMTXkkbSosPAgMgt+YGzCYmeL3OdBBC2x1LIqEwlSiHcq0EJuxKoi5SxOH8AqDn5/sNHOuVo+u1YUyOVnYtf7OrUQuxwwmxkHewmySS7x0/txchXwl1h3Rd6Ma6eTQ4/rpxGNbHo0bih9CI9BNG0ro2uzRWSj2qkbpXEmIDMcHMzKj9fSZqRdjAB/tHQ4kWCFXImwXd8SnFwzoQLKiOcYr+zPLKI1LghKMTiDvUjNEaaHOPDjImiN6h64efwpsbM3ZqQXsFaAtJTQuwvYhMedFLGwvY86RIdNcnrU4lnatiUAP21cfzzL81br6y8iVtyhEbCJSXxAnMDPvyC5KMub/o7NsTjeoHQSziZjWmnRRNliRza6Du1d6VCShZJAAYDaI6KzPVIWZqGI6muqUewK74gsxNWT5HLkh6nL4ojuJClInsYARKjyandsx1qXS5r/+Ijbjw0r6WKqsv8d6G9IQl68iWOOUlZt3y1NPqcDLAAcl+4B+3DTMqZTGFuJK1s1UATp5Y/cBzrNw9CaHIyDyNHiAzyhl8NNrzrVLJpy5+wh X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR04MB559: X-MS-Office365-Filtering-Correlation-Id: 87eedde7-65b2-494b-150f-08d4b8086828 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:DM2PR04MB559; X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB559; 3:63CzJujmCDwwVXWy4P/BfMFwkl5Qza3+DYV3nU3r9GVV+jQ1ic63f/tltBV6ly4VDfjs5ATbEOi3C+BFhGnQ3lqPUzPXchS4QOCwkI85oJG9CLR7VsiS5xRXUngD3Fgyz/DQLnh6/XkEyAKfHfNpKilzklkK1Knv11KaOJ2GHuFqSKfCke1qfBITwVUpGI8ePK2D+x83nq9d3+1rb1BgFFuj2WbgoLNv2NrrxQcsvteBTHDT7XyPykJ12IVxMg5qXwcZ5Nm1cn1LFsVztm0FTOS43jZnbXmdSEmilBna1hgzn9uAid8P0/RZ8vIWIV3GjJe3ei0nDKSpBv3nFkWJyx8VSV1yai+CgRiufP3DPS7ovcnRb1uxItGaf/fZEujo80mkf1IQTqN0MfLHO80EYOg0sse0dZQCgw4sIWMu7RnkukBmosTBEMZl3zHo9+sR3D/cEyPaegBDYH9rKTaN6Xvh5JWA9Mdp5ASnLs2soKXf9PNRSoeqYa0/w3pSxOzN X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB559; 25:XPhnxCqTTWsPUSOHwifFT7Ilft9e0p/UfgFGbfGWQlRxsfiLHUU5YleUXjlhF1v1Ly3naOoB0UniG4m+X9j30yIL+xHCQOp5yJ0E62OnSwgARkLBu1EsQNZd0UsdDa2JsJCziCNb7GvUVBftn8XZQRqpSlxv/ihZv6pYWShcYsKHsI5AfguWKMBVlabxuiS1FoviasEtQP1fAJBAI8KETLi9Qk+a73dJXs5zYwVs606YbNAzXhn4NAoXbrZ0nqHTrFOi2+Hcxi/iy+V1jVyCv9GrWYqIL7nBpF/BDuSQi6FAd5tOzM2EEqb4rwD662FpLvMy3GY2znM80pPg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rSL6dRnml09azVVPibzK4q+cy7yKqN+Na1OwsqUKX+/1E+VKsrhs+vKnrn7iEKqbeh8WpDPdqsmAkpLYsS1wDP4kshbHIj3C7WpSDtRoHOj/IxpnWgUBDWu5lmdPvsTQxSULu5oR53/NjptHE8dFz9zqEJtAwuj/aKOT6sHGePbLxJPXMNwuooMGwGUTck/RTe3G8UFYOmtHczxwSVsyWM2rWdjp/Pj/KwgtcMWJfBbv78KVdJBrloQ1fHvLgcFyOv3jg/nb66jsq/+ WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB559; 20:Vze9Jjw/CJaB5q0CHRZEm6ofQNCtanHZOFLuJG2B0lgFw6g7bfQuFEoZcVVD1kotfrNi7rxp7L0kNZAw8LBwjRIcQ0nPqy+MWhjHXKdJcYpwBXXJRShWXXcCMQbMn9LMW7wLrP1vpkNHL5PX9e7p+lECmkcyI0qS05DDi3N3gCAAkQ8PcSTYaeP2X6t3eZ1psoIbw3U+UINCA7oEveaeDVdzmMab+O8ep9uZwjTfotWf44GXqi0S374uAoONlEf9E1ysUp0cECTSDYu6huTHesuptjb1GjUAybgU4D/f1Pket+FCT5aClIfGSEjrJnyjlZtM/vV8kgZjqoU5uewC7F79AvOAWNtZU2CPr5paE2hqufU/EaDQdF6z7+lzVWHN95L0UD4Y4oqiGO6Dqzp7BEvd5zYeGNa1ROLroCCAPSOEDiQYlyO+k9aYwjCd2d2W33bMKa56bd1xbFqQLyJe0CMyGZh86MAVl1tVq/I5APqOFYZgSVVbC83KGlVAsNpX 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)(93006095)(93003095)(3002001)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR04MB559; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR04MB559; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR04MB559; 4:b2e4kivdzBxCldR7LuvylDtJi1lmzKdTRvCV4v0dfYG?= =?us-ascii?Q?zdfnoV1GCXNBpjj3MoFywPQd6zxC1ThHpmKpHteTUEyUGYb+Uz5ryQWCWbs0?= =?us-ascii?Q?oRxNmVeJ9gMNrrJ9S4U5P/JjtH8aAKh3JzxWVls+dtjJj8Kzm26WThEjEA7o?= =?us-ascii?Q?0Ti4ua24Nlniy0AzeHjUp+Hdn7DSsmERVsQ70G/MFe/ivdUFgMH9EtsKS/E3?= =?us-ascii?Q?Knl63QyTFSYvIteiWRN6vaANNishqQBeUFhtTKqwedzDVMpsUKwtUK5fAOrI?= =?us-ascii?Q?B+vptFZjRR/xn2mMp+/K+R8V31jxLLZ3z7Rqh7PHvW340KsubQlB0wxxqJDV?= =?us-ascii?Q?TBdGymNpPEjATyMYHyWk/o6y5g9dsIVc918ZO1rEu2OIB9oCKYk8s9UwSJRS?= =?us-ascii?Q?DbL2nPE6TCu0mKoyBzU6K2Rkc7TQoXf/qoIDXqgnjgqmSkIGGBNkJoa2h7nJ?= =?us-ascii?Q?gh7Cj+9tzV/Q1sTH9cJ3VauO05mTeIlg0C2jRMzmvo/Uug0Exx+GzZpg954i?= =?us-ascii?Q?8lMV8ZgeraZDyLsZJD8tH82yS/y0Y6Na+auUaLMdhzm/dr1jdPg2mCCK5w8c?= =?us-ascii?Q?dZOeYT7Su1FNk1V74kSNsltkZB/ocCaCJvWh2lpzAhrOlJ2IMewog0uQ8Na2?= =?us-ascii?Q?kdKa85cCZKIFqcLXOdfNM8jrv8M8rSf9FfrnxrsbanPnJfvuK9YEsYhyqF9w?= =?us-ascii?Q?2c2ix270q9TMlY4gJbvSZ09mwNTfGA6NH8AFJAafh0NXLt9lnLkeeT30lEVv?= =?us-ascii?Q?ajz8ztC6VRRcYouCRWKT3D3qrPJ9OmMvtuuyaFcWvTacdGRk7bV3i33U9lbb?= =?us-ascii?Q?LZIODmsVusveIUQklerwXVVnM1BSPs90+eI2/b32qBy1VKZEhIS8+6PxP2mz?= =?us-ascii?Q?R/6WfPVPVfOQ3JYbFuo6VHVlyBxsaFigdn1kndjQRv3UDveiPPCb+PG4n+9m?= =?us-ascii?Q?9IGO9S3ytMMbHYm9MupJjKgC6Ni9HCViu3+teDGQoTy2gK1Rfkho71reRM2v?= =?us-ascii?Q?SDJ+D/F9A11nASLVWmiTC+tvKx01egdwhKPWwV+4Tyg6SN75LA9nYhdR5/hy?= =?us-ascii?Q?zuJyNpyCogOqHKcIoBWkN26zn8WMR2Xstvt1l0y17PU5dvGyrMp8Nta13FXo?= =?us-ascii?Q?3z+OF0pDrEVPTf9fzb2Q4vNnVaolan4SEUWPVP2Cg49Y4K5t4/ekL5tD81rb?= =?us-ascii?Q?yjbp0wY4atfX7MN3aqZcXCW/74RRDF/2tDYXAOkQmCusNH/BYbSy1L6WZeI8?= =?us-ascii?Q?bIpgK1SB2u9gndXfdK1yHYALyB/lqnd+PBJii?= X-Forefront-PRVS: 03449D5DD1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR04MB559; 23:+t6RKVlIcjh09l6BZElQkpwSFAtoFhkgeKzfDj/2hL?= =?us-ascii?Q?2yfLzdyFWAMhJQ/UZKTER3sc5lgTfpjEYCMkm7JgwdcceIOPRQVkvcRfo5pI?= =?us-ascii?Q?5Fv5/OacK9+l8bzCMC+XaFVNeLjIduumdup+R2wkVhyi9iL4am+wSs3uDyfd?= =?us-ascii?Q?RssPqZguvddNb5bP1vSLN8LrRThe/fUEMD6p/eYKg5Bo9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+4jEpbHVyOVRaRjnb2MZ4baE7CztfQBd5cb+a?= =?us-ascii?Q?USzpxsAAAKe2OGodOojBeJpUOwEtriXnUwiDZ2DiKp9yvYuooLkmv4v/86Ay?= =?us-ascii?Q?E58CdGfffpFrbi40CbNGJBejRwu/cqel1KnZ/90b1A1mlgJNA3/nW7gRMtu5?= =?us-ascii?Q?wyhWTRtA/8gyWFLHyX3D5yzY+5wzRk5Ly5dDuB3h0140RinD7VQdRs/A5vRb?= =?us-ascii?Q?qu1sCfE0ylRoE5O6iWczPNKg4doZJZiMCX2YYO0kHrm4st3wazx2NE8hRrD3?= =?us-ascii?Q?Zf2XaR9ZyFoVcHswRRgr2?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB559; 5:Y+yST+EBJXYdVgo7sf/VqrLou3860eoQWP5UxStBscLV9e2BZKOLLyrjLYhP1p9xQEOe2hk3s/wj0cWigvp9o0FshSRR0j++qEy003yxwDlRb1/MRxrxGvh7UCqfAMDfdbPtg0G62Q2LShYIsoPFKBh7muc+VF+SNf3+HaT4xw8xazirSYxjgYDBBq0keH19lBefMcb+rHhMuukS5UxCe9izwyVICpeo3cQgCbKv38n/VQ0UER2znjQICe2/IBzbH4fRhzaSlNnLJscvuA1BpizOOBL7v74dvU2UBnm4GnwbwDk7rUdR1tDQ5QMVg1G0wFYpuBw6BTLqj6zIhCf9G7c+qctRbvU8HNk+O1FihFDeNQ47vWJXlaVaWQChdxk+a/F0c7OsRvHNaCy0mGljNZlmJ2F3I37rCUAVcdo017dYSsobIcRj2vv2ao7GPk8BA6SpfSwtl8a2qyMGdf6mZR09SGd8v5dhxJjmnNMA6fC0LSl3+MrrhXXqSQKQeRWB; 24:3FLlG+22RiWClP67dhMh/rhOSHidbXmc085JR9vYstHhe/VKyOPE1XJjWCSenY3Hfimr7Ng4IaEe3Ha7IxMz8mB3p3KdCr73HThqkQhrioI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB559; 7:0dwxbVzXodEz6KW8k7qFxoIMNDzLnaGs9CYFTkF7jVV8OSd/ekVTXlxvmGFrFh/SnzVOJw9eKSCQBzn8CYuFVgsvvTKYpS/qiTRmb9q9IHqE64j4nugIL/cUjHTq550Yytw8utnBh0CXf5qWrWm+c0s+6pn1ZMh8hcVa6tH7zKT6pgAa1axS+DXwoBBP+7Yr9Ap/mcysBlZaemgIMPg/iJ27U0iz5tM0n1Pozfa5ZizfL1IWytnN+oQRFS/jt1y01tv0xSljCGskgujTS4klaEGCi9ebT300UORGSyMOQwl1me7vMmmTWMjitFQHU/a4/cWig1HXr410eVscaSm9VCQrCBGYmXef+UCY5Crpbd5DDviP6oiQ3bJcutP/SU2EWKuIUHJnK+bWTS41tzrLMBX5GbAV6mZtxard4n00R3OimvivuiaiYp6dUiGoMSZSX/dF/GUQ2lANx6302u8y5MOe5HWQvW3aVBfIHGBMB5yHyMrI2bE0eEBbdhneVBFmQ/BFYvmVdyUowE0paTa9k7YAOwER8nH/yeasM95NhqLZvrATUsIZOadJEpZeWF0B0orYmZjDB58tgCyLi+jh7AtHNwhl4GjFwD0ubR/dy5FUax26aMtoy5h5N0iIw/tFkF/Dw2y0v4Lwnyr3nRnQ4Qt+pZqdbVHU6VaO+VycCTYMJkZNvDrKybvNQstv+ej8+LXFsM1cklpcbf1g2Xl73tgIiXcl6Rk/lfpEZUiKgOHColhXdmDBzPMLKtx4qH92w6q9OSKP0rU2pnIZJOnoNsf0MmOTMXJdhekaCoerdU8= X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB559; 20:82PACajjM6va6JoJHZwB60oyDDy1Br+fceVY0/vtR3oAuQX33YPCl8QsgYnOrjWmVdIL1VFI/Z1RHOjsjYoXuajCMAOrxHE9A2SBBhGVfRw/cl1vzb9oRO/cDQOrvYxKRb7ejxxrLJbouESZBOk+slsWTeZcSSusnc5LOeQiZ6I= X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2017 18:16:00.6226 (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: DM2PR04MB559 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 Document the locking assumptions in functions that modify blk_mq_ctx.rq_list to make it easier for humans to verify this code. 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-mq-sched.c | 2 ++ block/blk-mq.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c index 9f025289da63..191bf82d185e 100644 --- a/block/blk-mq-sched.c +++ b/block/blk-mq-sched.c @@ -150,6 +150,8 @@ static bool blk_mq_attempt_merge(struct request_queue *q, struct request *rq; int checked = 8; + lockdep_assert_held(&ctx->lock); + list_for_each_entry_reverse(rq, &ctx->rq_list, queuelist) { bool merged = false; diff --git a/block/blk-mq.c b/block/blk-mq.c index 6268380c680f..1d8050e49a94 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1317,6 +1317,8 @@ static inline void __blk_mq_insert_req_list(struct blk_mq_hw_ctx *hctx, { struct blk_mq_ctx *ctx = rq->mq_ctx; + lockdep_assert_held(&ctx->lock); + trace_block_rq_insert(hctx->queue, rq); if (at_head) @@ -1330,6 +1332,8 @@ void __blk_mq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq, { struct blk_mq_ctx *ctx = rq->mq_ctx; + lockdep_assert_held(&ctx->lock); + __blk_mq_insert_req_list(hctx, rq, at_head); blk_mq_hctx_mark_pending(hctx, ctx); }