From patchwork Thu May 25 18:43:25 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: 9748941 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 9752260209 for ; Thu, 25 May 2017 18:44:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E5AE269DA for ; Thu, 25 May 2017 18:44:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 82FF22836F; Thu, 25 May 2017 18:44: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 18B88269DA for ; Thu, 25 May 2017 18:44:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031678AbdEYSoG (ORCPT ); Thu, 25 May 2017 14:44:06 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:15582 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1036492AbdEYSns (ORCPT ); Thu, 25 May 2017 14:43:48 -0400 X-IronPort-AV: E=Sophos;i="5.38,393,1491235200"; d="scan'208";a="21570890" Received: from mail-co1nam03lp0024.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) ([216.32.181.24]) by ob1.hgst.iphmx.com with ESMTP; 26 May 2017 02:43:36 +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=L/SY/Dogq+x/VUjHhUqLDpFM8csEMOmn7UZfIB2Vw+g=; b=lvm0ygRYlT7kTUBSy/q9nhKXFXzjAkNHk48TiiulmHetJYvErFOdMdJVAtAItbrnRjeaV4uVh6THeUUyAEATjRMeUam2laAMestNo5zbbkEVqLwtI/U+DUUDZXg7IUN7HI69Teb+3zy7DWenni/D/5/4/lqn/pSwHaQShiSdAWM= Received: from MWHPR04CA0029.namprd04.prod.outlook.com (10.172.163.15) by BN6PR04MB0356.namprd04.prod.outlook.com (10.173.198.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Thu, 25 May 2017 18:43:33 +0000 Received: from CO1NAM04FT004.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::202) by MWHPR04CA0029.outlook.office365.com (2603:10b6:300:ee::15) 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; Thu, 25 May 2017 18:43:33 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; kernel.dk; dkim=none (message not signed) header.d=none;kernel.dk; 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 CO1NAM04FT004.mail.protection.outlook.com (10.152.90.121) 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; Thu, 25 May 2017 18:43:32 +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 D7.BC.45291.4D527295; Thu, 25 May 2017 11:43:32 -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; Thu, 25 May 2017 11:43:28 -0700 X-AuditID: 0ac94369-166ac9800001b0eb-18-592725d42985 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id CF.E8.11415.0D527295; Thu, 25 May 2017 11:43:28 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Christoph Hellwig , "Bart Van Assche" , Hannes Reinecke , "Omar Sandoval" , Ming Lei Subject: [PATCH 17/19] blk-mq: Document locking assumptions Date: Thu, 25 May 2017 11:43:25 -0700 Message-ID: <20170525184327.23570-18-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170525184327.23570-1-bart.vanassche@sandisk.com> References: <20170525184327.23570-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrJLMWRmVeSWpSXmKPExsXCddJ5ke4VVfVIg5PfpSxW3+1ns1jwZi+b xcrVR5ks9t7Stjg0uZnJ4vC9qywObB4Tm9+xe1w+W+qx+2YDm8f7fVfZPNZvucri8XmTXABb FJdNSmpOZllqkb5dAlfGts3vWAs2clU0dV9iaWA8z9HFyMkhIWAiMWHiUaYuRi4OIYGlTBJd C06xQTg7GCWWfTzKDFd19gc7RGIzo8Tsb2tYQBJsAkYS397PBLNFBBQken6vBOtmFrjCKLH2 8nc2kISwgLXE9OnHmEBsFgFViQMH34PZvAIOEgv2fWCC2CAvcXbLTrBtnEDxL1MvAvVyAG2z lzhxwxFkpoTAIlaJQ+f/MUL0CkqcnPkEbDGzgITEwRcvwHqFBNQlTi6ZzzSBUWgWkr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: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39840400002)(39860400002)(39400400002)(39850400002)(39450400003)(2980300002)(438002)(189002)(199003)(9170700003)(1076002)(478600001)(50466002)(36756003)(72206003)(47776003)(5003940100001)(189998001)(356003)(86362001)(48376002)(4326008)(305945005)(5660300001)(2906002)(8676002)(50226002)(110136004)(33646002)(8936002)(106466001)(38730400002)(77096006)(81166006)(50986999)(76176999)(6916009)(2950100002)(54906002)(53936002)(6666003); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR04MB0356; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT004; 1:eJUn1GSGcbls8AyH8SaEr2ZIP/pUG6D8//eUW+V08e5XkJ7PgzDAgaH7PUczr+jjAWMPSV3DhFDqe97OgNxn+iuYt91rw9f7ay1e44f7znb/5khBgoCqDeLYWMzS4jHlPQGzAP3RkkDJRLSw79CZ+OriZ/uyxtUrlAuDP2q8E6wrRw2zEONEcekFArEkEJ91KO6eLyQ4oi3P2BZG2l4ZDGXPmyIgD9FvY3cNaRfPtvpuLp5vOXsJ/NX6ENg/9I8MrcND3h6wnMUex/GL8PArjqXU/QeBiUoC/AD5MnDOhIBt8ZhMRJbT95tb+vUWryHjheXYir/wvJnaLidakNlA6PWb+O8VEPnYkgRHSinUdamKPlwuL9TsmbvS3Ue4ZPtLNibDkoIbtA4Bm7ZfsVu9tSjnARk+xg5rQOsY5phTBRRHkPtktTTbDhVftkC6DM0DOmlWqU41hf1uDdV4IC34DH6kC1DCZU65hazw1ZDa/aSfdxxrzJZjRyXj6QLIxw8o X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6PR04MB0356: X-MS-Office365-Filtering-Correlation-Id: 8671c683-9436-435f-05b1-08d4a39df224 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BN6PR04MB0356; X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0356; 3:usR2zi3At28RRRc80bRdR/Qpfd68IG8lKbunxfpJ4366MgZ7yXmyeSWPZEdcrC/SWZn1TLoKV67HCpGqr76TQjcsP1dVHVzW7EdoWNhPIos9NIYJAvREU+YhOMTTeqObWKaV8n7GRgyP04Zq0IVXC1QXvBFd0yknYq+GE8NpXzQw/b4EOgGlwgh1oAX41KukKeN2cD6XRg+FU7kCDFpyoZ7QXgMyEBMnrWAFKFsqQlMNsB0+SYVnh7+3yxuNOPEYjhDVAjWwnSYrhv+cXWJnvf8l17aVgWwASvNDt6ytZHhOK+6XIIMSgBk9a/TtUeSmiufhXEPkeqL3H/yPTiVPwgPX/NWRwPCEd8EEh9XzW1ze9530elnf8YBhRjVO9uAZomLbTgRQIa4vug8tPh9g3rWaACC6JxjJ3MG9zvUzIaZ0arBm1vrPq68plfy0fOThIMmg9mpfC0RumUcLdODOeYf0p4VNzAlqYnJvjERYApGLIr7ePU7+ps8SAyVzJP9p X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0356; 25:73P3s9aELIpwuB5w0HzzbMe7BXtqmX3anlJS445P4zR5Sho1d5B3fsAoRP4RXmO9+Cx/0KHLNz7wluaZDkv58iBXRad6qEMTN1aPEMlCvs+LpEPibVeXtHpPQuHSVagBOPuxJsXSSbDVboaiWm39RIZ+TFKQ26I3S09fXj5jZgeFvxnnDNVI6y+FsUuvPNtoNjaQBiIT8v3fQFmyNMoo4+j6d8kElWww5BzsoVh99EOqmYWmecpf/pES6nsb2rRGiWH4Vj52rOYXV/mjVjLdz4Gd59ch5rAtL8ZkmWMIGO1aF5HHw/904FC7vtlBXiHjJ+mO4wfUIcZY0qlixdc/YDFH1jCtJelKUROCm/IT/Y3d5MEu5kZ9I1gQcKmlaqstwhuyg3QOYJ/nXq9uCy9KV53/iH9Hu0xNigReu2lcMl9OI4jgCY3/kmcZMIeIkp4wOqHJZ35PgdbIlSMQTFMZsNz2rGQfG8zBdGgAQ9V/fsE=; 31:sfB4SGPvK8CX2NqpAGum9LmxpPTyC1jjl7YunLlrOsyAlmOyUtFiobVyPQqHuj1zEKDd0hwzVmPONk8Z7NdPBSbDn6+JLe+1jovrpHFI3g+WJdVDlnYHvlfX1MOo/zmxo2DYC/9KGo+x0L+ygg6tPKwCw4rjbi6JfW6eNxkceiFm8Osy1wes7PaingHRZRlIMoICeqPd1ucD9BFLnUS5K5O1RbX2FIRDXlkUoQSMJB51x8SAZwCvITRt53aY+kN9 WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0356; 20:E0xSKpRrMhYHEXBS0fO7/G+3it1ydkhYow+mvmLOCVwy+Fsch88oFImyitZ6ULDMjtqENd8rmkIN+CQ1+OigYN19zX9AasF2XGkwLyi3g0M0y6NKhnnI+vP+qoc+Tk+KrxoqRW9nXvKLMQ0x20WQDHDGIB2yKs0IFarr8Yb0sbN8o4RCBmsQ5ovvSKZej/KCa0eVKI3GOn6NO0bmvKizkGtMvM0HASOcQnaoT/WnsBwQVlOXIVFSr/5ND8udeuAk9cMgWD7OotoaYhOBV9qL2E+3ZJJ6NtygLqw6MO9FxR7yiM6UTRRiU4oEn5oKYICmooed6RnJ3Quh27ndohMIjYcY/D1r9WI7qzYufD7UH/4jSPikpLTzvYWesBNABEHGKWhZJ2dME8rn3ENfRMhKcLrV2AIs5jf1tUevnvChncxhD7k1lhM41Psr6+EqW8tBaFfM1IklbRoh0WUsd4fBJniEs56LffkrSZHGf8FWbcckDxckkPVzIbze2o4K8b55 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)(8121501046)(13016025)(5005006)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(20161123562025)(20161123564025)(6072148); SRVR:BN6PR04MB0356; BCL:0; PCL:0; RULEID:; SRVR:BN6PR04MB0356; X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0356; 4:exjA3wpFGiONgRa38ACd7nbm3Isfyk3S7RLY7ClbuRZRiaEOUcQX5RIolsLGj5ItktaFXo8zqE+PaqqEwzkkrslYY+NL+lrQBY4Sc9EweEomrTdQ9NDzblY8Pj2tmVmGcMpO9Xg7S8nMkC9Rg6qfFf9V2zoslklAe+tIgOKjnRxa6ByOo3XRCSwk0KSUH8oBEGItha+oT/wX0HhGY6Or2oJ+iiMEj1viNqLyLdeXrDfpL0kmG2c6+nEJ1j3hE8dPCa79502pZUL25ox8vTIUIi51hJiGmnz7VbvSja9RfWZwz+IGSvhCoNnrXnvD+SVcj9cZ76rdZe+4Uu22hEfLVVrnjXrbRNnE43AltDGSL+i2X3bM+rYpTdiFdIokJQhzl7ERdCdXpxmWrTqXQTd3Wx9FZX2saBc2uDYKf4VW1twecCl0lSW5rd+/TBFjh04Q2rQvCS9TtozhxDhcV1wmVKXpqWpm7xl64AQTIQh4SJhJut6eS4TgKVfEWyDDhVSVjd25rTqoK3nafxWs27bDvPUjIdu9RsINXQLaTmsZz1ItlN0HY6pql8U4nPUYYkz298gN5iNJphG3AfTudQQunSAUV+4X90tlP0AdCk2Ufy0MGBWPK87wvLD3Fhsc/s5Zm0WL/pcM4oKApGIf0GJut7sz2DE6Ilx1sFVGecEPhAU4L9lY4N5P+W0Fp5oy0lGNToagHrX++tBPhDEp4rfsFgBcaEOXeEryu/+SuPm6Id+MQhHWFni2sjlzka+4LrpjBjnGY23apc8kHmn2LFAK2rwQ1KBGeM3gE6SMMSZA86sAvcF0abb1ph/Ummhd4VLnVWvXQL4DPGf7nj8grxpwH43o5k/sGd0wWZTgA1SehnlzcX6p+kLWzkxcLV38pADjZv30jG3FYSHSay24uNt4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EKcPHq+50ttl4NxovFCl3MAoBdpNXOTettDSuodAMrvR/7uKXesyG4EQnyCL3vVUiKXKgM7qU/oBN32y8EfSEkD4=; 24:Zuz0jUGnjp60113bFGqunvGi7jI3NYOQe9AYoCYZxygmseyHj9xl1+Rr1twjN6pKnAbq+KhqaFxYIVXH5X+Y+LCt/8XYXWGTOSWM8xqDUOc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0356; 7:u522hIsuGEpbGxWBlw6TKkR0TVgOI6gNFc5f+EsOHqV1GIy4MfjcDTAsMnwkzf3/p+BPuJ7Qvc9Sb9TI1O8wLHcKL6r4opul7lo3If86GOpJ0ucu7Fp9grWBBpU8ABh6UE1eKRD3OZijBYW/rGRtYqAT2Gu5/Z9ACNFEETImJxqKaNFYv0lGDOr6tolVzWTsnsePRE4KQaZPymXFLF+QDWJm8sL4UbkUb7NKb93J81kNqkWxMSlNvWEb2Fs30Uf1r/OfkDpTG+K5qydgg3mvzXJn0qt82nosxOzinyG1atPZRqLAA/B8IDG2SYuBp02YPxMqJwBxSkbJIIb8Ybl1Hw==; 20:m1wC62aipDzaWJjja0z922i1Mv6uIOQ3PqdbpVdcpxi34UFFL+p0XrzQu1NHKTce9ONk7QOVWFgsrJIRJDx9050V0/6DFmjyKdhxlhEoJVgTvHWQgcBPm6RcNzMlKdp8ha0leOAvPGI+AS7RISzXXxTIt0yXw1pdm7qBmxnOyfM= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2017 18:43:32.9816 (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: BN6PR04MB0356 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 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 Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval Cc: Ming Lei --- block/blk-mq.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index b230038eba1d..4b1b2c7b4344 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -785,6 +785,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; @@ -1338,6 +1340,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) @@ -1351,6 +1355,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); }