Message ID | 20170531225246.26261-3-bart.vanassche@sandisk.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-block-owner@kernel.org> 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 9418660360 for <patchwork-linux-block@patchwork.kernel.org>; Wed, 31 May 2017 22:53:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 854222766D for <patchwork-linux-block@patchwork.kernel.org>; Wed, 31 May 2017 22:53:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79BE3284D2; Wed, 31 May 2017 22:53:01 +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 C75322766D for <patchwork-linux-block@patchwork.kernel.org>; Wed, 31 May 2017 22:53:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751149AbdEaWxA (ORCPT <rfc822;patchwork-linux-block@patchwork.kernel.org>); Wed, 31 May 2017 18:53:00 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:54550 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751041AbdEaWw6 (ORCPT <rfc822;linux-block@vger.kernel.org>); Wed, 31 May 2017 18:52:58 -0400 X-IronPort-AV: E=Sophos;i="5.39,276,1493654400"; d="scan'208";a="21798240" Received: from mail-co1nam03lp0021.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) ([216.32.181.21]) by ob1.hgst.iphmx.com with ESMTP; 01 Jun 2017 06:52:57 +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=6i0cKOHRmh/rGQFFKke5uJ7xQiy/mUXKyY9Hy4B/NvI=; b=eGpNtTqUNN5EnbasIgQV3F4dVvf1Aw9CCXWXhrRq5pJ5t75ggagpybXHOj2v7fVumnHBxSxH0eTK0M8uPLPr6R6yTxVDbHFA4laiyRmwBx34YDCf0t6j/HrL7in5y06sQomLSh/DOuJeoiK9SJviIHz/DgTKxlkUO+spFPwmXz4= Received: from BN6PR04CA0057.namprd04.prod.outlook.com (10.174.93.174) by DM5PR04MB0397.namprd04.prod.outlook.com (10.173.169.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Wed, 31 May 2017 22:52:54 +0000 Received: from CO1NAM04FT026.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::200) by BN6PR04CA0057.outlook.office365.com (2603:10b6:405:3b::46) 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; Wed, 31 May 2017 22:52:54 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; fb.com; dkim=none (message not signed) header.d=none;fb.com; 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 CO1NAM04FT026.mail.protection.outlook.com (10.152.90.124) 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; Wed, 31 May 2017 22:52:53 +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 EF.F4.51736.4494F295; Wed, 31 May 2017 15:52:52 -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; Wed, 31 May 2017 15:52:49 -0700 X-AuditID: 0ac94369-6dc8f9800000ca18-9f-592f49444058 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 1C.1F.18148.1494F295; Wed, 31 May 2017 15:52:49 -0700 (PDT) From: Bart Van Assche <bart.vanassche@sandisk.com> To: Jens Axboe <axboe@kernel.dk> CC: <linux-block@vger.kernel.org>, Christoph Hellwig <hch@lst.de>, "Bart Van Assche" <bart.vanassche@sandisk.com>, Hannes Reinecke <hare@suse.com>, "Omar Sandoval" <osandov@fb.com> Subject: [PATCH v2 02/12] block: Introduce request_queue.initialize_rq_fn() Date: Wed, 31 May 2017 15:52:36 -0700 Message-ID: <20170531225246.26261-3-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170531225246.26261-1-bart.vanassche@sandisk.com> References: <20170531225246.26261-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHLMWRmVeSWpSXmKPExsXCddJ5ka6Lp36kwdVfVhar7/azWSx4s5fN YuXqo0wWe29pWxy+d5XFgdVjYvM7do/LZ0s9dt9sYPNYv+Uqi8fnTXIBrFFcNimpOZllqUX6 dglcGV/mf2Yr+M5fsWT9HLYGxhm8XYycHBICJhKNu98wdjFycQgJLGWSWPbzKhuEs41RoqH9 FDtM1fcr35ghEpsZJTpeTWIESbAJGEl8ez+TB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Bp7UH8q8tOvjO+52UcHeFjLh8b1iJXkd1qfLD74vD9y0N qDk5y7lSN06JpTgj0VCLuag4EQAtrotAwAEAAA== MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 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)(39450400003)(39840400002)(39850400002)(39410400002)(39400400002)(39860400002)(2980300002)(438002)(9170700003)(8936002)(8676002)(6666003)(2950100002)(81166006)(38730400002)(110136004)(356003)(86362001)(48376002)(50226002)(6916009)(53936002)(50466002)(5003940100001)(47776003)(50986999)(2906002)(36756003)(1076002)(106466001)(33646002)(189998001)(4326008)(478600001)(54906002)(305945005)(77096006)(72206003)(5660300001)(76176999); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR04MB0397; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT026; 1:boQkrDXmEozz7sZcv9Oqk/00LUiUyIIKTLi4ycQL9toeK2MzbgMt5xsxebJl5INBTEMa8Q0KFQ0fpZgSbr6uATkYlemmJ8/GnnVxvGc2kRI4gjxxjw31WsqQJbGI24YuxVlugzwff5m/R7HeN4k67SKw4+CKT0FGWb4enNU+ibFSm1Owjc9kytnlqu6UKuE10I5oYAZDXA+ye+yeKrNW2Dpsu43L/8E5SVQWlOQU9ybAlw1uBbp1/BH+aT84elra2AGiGRzCslCA/2gVT/T/7FzRqLG6pbX/JnEpbafIfocvMXIUfoZihB++DH7LSTZmwl5N4JLtdQyoYDs1gKB0U9jZpjeq1S2An+xy83N6c4IpyQ5izrOadmmjMxkfoLXOrlLyrAAgspX38ftu2c55gUlPxGnU87tcDjGv3PZywMZGVEV0tbwSB+1rqe9NZLpNqqcVf+SromyDWCoDtNy1C9U8ORtnVp5XKFwg3Atj35zwHj8KJWAADIq4w2l11bZOVpPaWz3vc4/YuVU768FdVkhjHypbsFKffDMxOkCCyG0= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR04MB0397: X-MS-Office365-Filtering-Correlation-Id: 152cda40-b3c7-4525-b758-08d4a877c5af X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:DM5PR04MB0397; X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0397; 3:pFVbRSLOiS8/sPHlKAVWFjSKrlt4EOYOl1Z3m/V5+RCmEmUKFLPej9KLHxuTZo4gOKKY3GgQVi87e4B4dx+BkAaM7+isAI1D9N8g6d1wF3Mhnhwo815EUGaTZ+n/xF3dsdGps0uShotEcdJB6+vvD3P20yqmX6mqP85eSEoIqYDs4WUmdb1dxrDJA2VgfmNa+6brrFFOHg20AtwIYHK3cMFWNhT590XngKWpGxzKntWeqXtp2aAnR0ztqGlFfT77ESJkqeTgEiEiVnnn6pjlKRsssgV3FD/t5+ufgjU7gQwlhXBhet8y/NGy/kBxKhki1OGuerEeZ88dY6X89thEgHSKiCJLhsCSV+F/w6J8Y13V5A7n6wnrSIZG6d8UVr7vV5jR7ngOkLYBdu/zy2nZPJfpgV2i024UDLQZTxPJfiQHIwzPVnwlUp9k98ktiPLRpEJV+Oxn49G4VD9fFoiUEsAdu0wKA885oxpYk8aT0+QWdbKk0s9x1uqnCia0hRgb X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0397; 25:8aeDxkS7wVbvuOK97z1iYyXmxbDntvigaS4vmUVjt7bDRjl3fNGUi0azygn9GTZQlOeqt54xwtdIY7tYwvN18AWtTywllpwvSQDrVRR9ArUJrIKW6XnKkhycbef3ikcQUvvZPKDpmBedfBwrF6CSyjtWLC5slU9usk3fFXrwwjuar0Fi6C4W+qI412vinplpQ78YZgXiM6Lfuqux/ycbrh1M/nx10PwbcjEzfdguqOpiflJ8sXUDOR4r18AVLWO0C0HYSLM14tir0xce35ykZ3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Antispam-PRVS: <DM5PR04MB03973FF85C7AC16BCA7A353C81F10@DM5PR04MB0397.namprd04.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(42932892334569)(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13018025)(8121501046)(13016025)(5005006)(10201501046)(93006095)(93004095)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123560025)(20161123558100)(20161123564025)(6072148); SRVR:DM5PR04MB0397; BCL:0; PCL:0; RULEID:; SRVR:DM5PR04MB0397; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR04MB0397; 4:GVjjuNPMNIWnwsw+UOGZSxIYc0S3CpOLUOsw/SotWu?= =?us-ascii?Q?2byP7NCFaLN7dMi7k5wjxG1Y10o3mYGMZffiVn41YwO0tsqm1+otzeeGff4W?= =?us-ascii?Q?Q3JXC9ONSfgX6LfM9XKd/XnUQCyDgJBxblvBj8K/wDsUa81yuKrNRX0b2oRv?= =?us-ascii?Q?i71T/FS/p9im3AWF/dcy49BFNlEXfHYuq9r38qxKVN0SLtf8j+7uDACnzeVu?= =?us-ascii?Q?GIjRPBZ3I+DOvOOTFDwCR4a5vWS1nbfDcCtofPD+X6w8WM8BvmpraOqcdP7E?= =?us-ascii?Q?9dJQ1ZE5qx2RN1B3h5UR4Ilj8HmpUJaYlpyCDJmTCijALMnq+VDshWWQF/Sy?= =?us-ascii?Q?HF/4XbYV3f/ODk8213JmvCNqkU4y7L/p1L90dXMs1ONHeI7Tx9OWygiN81Z8?= =?us-ascii?Q?TPMLwfhqaEYyrrcfsbwl01e7VwUygbKpBEEB8UVvYImq3wcjgBYf6uN8MoPb?= =?us-ascii?Q?JagxDgboMnGq62Kp2N7gF+61SEpSovHUinlO6INzRAp651x0Ver/6bB/1OS9?= =?us-ascii?Q?KYPVs71pDdxdZEkoGvIHKGMjYQJ7A5mroaN4Ds0t3K2v+TJCIeCkIKks/HmE?= =?us-ascii?Q?EkYO+Sju18UQzEWQVa/7swsxgsFGP//CJ8Nwh1YQIjp8E7k7v4oeuaXL1z+t?= =?us-ascii?Q?iZIioi/70ZInscb1qyN8+cgCFnZuvcpoOXoKOKdNEog4cqcE3HELIHEl1cu+?= =?us-ascii?Q?/rRANalB94mqVqvXpPwctP/zaxTiiDrRn4NOzy4GKTxbVI14mvw4AqnjrQCD?= =?us-ascii?Q?genKcUdBxzs7XPHcMFfrjrMmKIlxNsk4q/9VUnCoht8ju5BRbgVHf/mUEBAe?= =?us-ascii?Q?cDKNgNVUDuwgHk8KyONrSWZ/KXhpFT/3L00ZwVnQeS/rIp2l/aRJru/rxB7f?= =?us-ascii?Q?tV4O2ZVUUPUqAgUGr6tQtkteik3qed7r/rbD89Sgp1GurNuTzZoeUhMSANAu?= =?us-ascii?Q?NBL1yR64MztlbQ6Ji6SGI4GZ1J9l9nOusbQVGVZA=3D=3D?= X-Forefront-PRVS: 0324C2C0E2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR04MB0397; 23:CS43jPOt6ZesPz1YuRzgZxqFIC0vQZxV9HO7LEkvj?= =?us-ascii?Q?pcLoFvbWVAKRz9rfdNFyMpUg8JGYA3sPgcP7lfonzbHtUfU/anY3cSVl9LvM?= =?us-ascii?Q?msFnInv5tokILQjZDDrnSHTNie8P8jvP8jMQdCnLA1T6ojgD2ugiNklLWnWF?= =?us-ascii?Q?OebPVI696G8EGOhcejWVP2Jo7U+irRZ3jEgq2Y6317WXZhM4FkyintTAtFeh?= =?us-ascii?Q?9OI+VMXLbHawdyuZ40gsyKTINoVrzLvDb2qm6+Eh3QFT/5b305DAs1siuqZD?= =?us-ascii?Q?OYRdpPQHn7klUIq4Tdl1JMYoulQ7kzcfJkV0Rld33TGwXJtPm6ZcZjtSr4pL?= =?us-ascii?Q?W34IXgiaCMo3x139pTRmvHx8fnCef3B0Znpk9iyFpIu2wu6X7NCwxvKkKwjg?= =?us-ascii?Q?Zjh0tKSY2OgesQWMN5tonqw1qALyH0oG+d3iVgygwGctPuhUsj2uEVdH39Sn?= =?us-ascii?Q?Mq3l+uDFcysMehwoYUAiK3QvvtE24LrgC71lzB++eRyXhhBQdOqOQxEaOlNa?= =?us-ascii?Q?16UTsWjwYfahlXNkr83/1tUKO1Kmj0UQ8fgeu0hZmrAviD25T6W67lvLjYTw?= =?us-ascii?Q?JvUXFGCWYdUdWNat20tOvARHF+DsBDNLm37VtBZUVtGhPl7NeW31eELnUpXM?= =?us-ascii?Q?P+1E6bELpPQnknn9xqwszByZzce3jbIHbYMwhlJ+3amhJaW/7ToZpvpXpYZp?= =?us-ascii?Q?V8f2ibxPd6XfaKDdQbZrj6IOZ/0FQqxOen5pMNA+OcHSXHjgCmTsIju2OhBG?= =?us-ascii?Q?SHpT0SQe4dZc0Du+FVVa/lA6RxOFE6OIKsr6873+WfRwGUTlmcAaQ6XvaUkd?= =?us-ascii?Q?ElhI6mmWhQwMqt/PUkZZflywC/rlJSyKNgdU652tubqnh4zT8O0XktUqDJx6?= =?us-ascii?Q?3pUZkVly4qHD9J6G+jOLaO0YrKGilBMMyzvVAYNdo/maFoBp2QZxOmIFCsOl?= =?us-ascii?Q?WTnsQ70mKz9kKqcUb3Xke0fTTxdb37jJgudl2MSS8BVbz9wnnjLQG7XciYhl?= =?us-ascii?Q?Md0nUEP083QTpUQ5ziliiq2UE0q5sc1bjq4MEPq1vqjZm9C5rhTY8J7kXrT/?= =?us-ascii?Q?tGxZOI=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0397; 6:IZM2kkFaK31Fbv9J8CmhCLqJn15kPXu1lPi5Zum+pQeO+U+RilQD8kkTHQtkJbKwWgGo9daeHdOwOExsDeaf1MO0IldHVHoYK7HInA3yCp3liXmPQBhAvRxcgxwjAV1c5VFHt76UEUSODjextMg7dAbX/fvSL+zGtahGh26Yci8/WqulV3+J4NnXJdg5nALUZnc/1Qz12I3rZ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M1e4BDat2IZa2wkSRqniixVqp2Ju+5mp/jJT72xTmiblrnn3PH/pIE+alwVRTFodbnZklzyXGY8pqrwiMX2PNvt4ppubEmCpl+MXpKTt7R5vs14/BI8kKLOY2KYqUulQWVaYd3RiMLc= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2017 22:52:53.3846 (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: DM5PR04MB0397 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: <linux-block.vger.kernel.org> X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
On Wed, May 31, 2017 at 03:52:36PM -0700, Bart Van Assche wrote: > Several block drivers need to initialize the driver-private data > after having called blk_get_request() and before .prep_rq_fn() is > called, e.g. when submitting a REQ_OP_SCSI_* request. Avoid that > that initialization code has to be repeated after every > blk_get_request() call by adding a new callback function to struct > request_queue. Can we please still have a initialize_rq mq_op for the blk-mq path to avoid using the operation vectors directly in the requeuest_queue for blk-mq?
diff --git a/block/blk-core.c b/block/blk-core.c index 3bc431a77309..3f68bc1f044c 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1308,12 +1308,19 @@ static struct request *blk_old_get_request(struct request_queue *q, struct request *blk_get_request(struct request_queue *q, unsigned int op, gfp_t gfp_mask) { + struct request *req; + if (q->mq_ops) - return blk_mq_alloc_request(q, op, + req = blk_mq_alloc_request(q, op, (gfp_mask & __GFP_DIRECT_RECLAIM) ? 0 : BLK_MQ_REQ_NOWAIT); else - return blk_old_get_request(q, op, gfp_mask); + req = blk_old_get_request(q, op, gfp_mask); + + if (!IS_ERR(req) && q->initialize_rq_fn) + q->initialize_rq_fn(req); + + return req; } EXPORT_SYMBOL(blk_get_request); diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 6c4235018b49..cbc0028290e4 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -410,8 +410,12 @@ struct request_queue { rq_timed_out_fn *rq_timed_out_fn; dma_drain_needed_fn *dma_drain_needed; lld_busy_fn *lld_busy_fn; + /* Called just after a request is allocated */ init_rq_fn *init_rq_fn; + /* Called just before a request is freed */ exit_rq_fn *exit_rq_fn; + /* Called from inside blk_get_request() */ + void (*initialize_rq_fn)(struct request *rq); const struct blk_mq_ops *mq_ops;
Several block drivers need to initialize the driver-private data after having called blk_get_request() and before .prep_rq_fn() is called, e.g. when submitting a REQ_OP_SCSI_* request. Avoid that that initialization code has to be repeated after every blk_get_request() call by adding a new callback function to struct request_queue. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.com> Cc: Omar Sandoval <osandov@fb.com> --- block/blk-core.c | 11 +++++++++-- include/linux/blkdev.h | 4 ++++ 2 files changed, 13 insertions(+), 2 deletions(-)