Message ID | 20170608173355.25898-4-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 0FD05601C3 for <patchwork-linux-block@patchwork.kernel.org>; Thu, 8 Jun 2017 17:41:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEC97262FF for <patchwork-linux-block@patchwork.kernel.org>; Thu, 8 Jun 2017 17:41:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E37EC283B9; Thu, 8 Jun 2017 17:41:18 +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 3200A28390 for <patchwork-linux-block@patchwork.kernel.org>; Thu, 8 Jun 2017 17:41:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750788AbdFHRlR (ORCPT <rfc822;patchwork-linux-block@patchwork.kernel.org>); Thu, 8 Jun 2017 13:41:17 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:47885 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751132AbdFHRlP (ORCPT <rfc822; linux-block@vger.kernel.org>); Thu, 8 Jun 2017 13:41:15 -0400 X-IronPort-AV: E=Sophos;i="5.39,315,1493654400"; d="scan'208";a="24717685" Received: from mail-sn1nam01lp0119.outbound.protection.outlook.com (HELO NAM01-SN1-obe.outbound.protection.outlook.com) ([207.46.163.119]) by ob1.hgst.iphmx.com with ESMTP; 09 Jun 2017 01:34:06 +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=C7SXW7tLTG5GEefu7zjdH/CYcDw5wuNYzk4kKa273Hs=; b=ReYYxm3AyS69S0bJJMWeU4G5qOJYoIB5KBXF6knOB4xaa6hQOz4Dw3UnoHyY9Lp+Ij6Prg6+jA6tFajBuyw3sFRjE4tT5SR9YAvIJr7DoV4sS59EWZzyhiOrcWLskmWAVobBz4ON1lzg9d8yoOsLb2cqbD+GSher3KUC46kGrYM= Received: from CO2PR04CA0060.namprd04.prod.outlook.com (10.166.88.28) by BN3PR0401MB1457.namprd04.prod.outlook.com (10.161.210.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Thu, 8 Jun 2017 17:34:04 +0000 Received: from SN1NAM04FT005.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::207) by CO2PR04CA0060.outlook.office365.com (2603:10b6:102:1::28) 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; suse.com; dkim=none (message not signed) header.d=none;suse.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 SN1NAM04FT005.mail.protection.outlook.com (10.152.88.160) 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 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 7F.59.51736.98A89395; Thu, 8 Jun 2017 10:34:01 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.9.6) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Thu, 8 Jun 2017 10:33:58 -0700 X-AuditID: 0ac94369-6dc8f9800000ca18-0b-59398a8926fa Received: from exp-402881.sandisk.com.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 99.E7.18148.68A89395; Thu, 8 Jun 2017 10:33:58 -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 v3 03/12] block: Introduce request_queue.initialize_rq_fn() Date: Thu, 8 Jun 2017 10:33:46 -0700 Message-ID: <20170608173355.25898-4-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+NgFnrALMWRmVeSWpSXmKPExsXCddJ5kW5nl2WkwfZ+eYvVd/vZLBa82ctm sXL1USaLvbe0LQ7fu8riwOoxsfkdu8fls6Ueu282sHms33KVxePzJrkA1igum5TUnMyy1CJ9 uwSujBdHd7MWNIhWPF4zl6WBcY9gFyMnh4SAicSBzuNMXYxcHEICS5kkNkyewAjhbGWUeN87 jxWmquvuR3aIx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oodmMW2 uiTnv9jn0mXpZveyv7iVCT/tynLlUdHx3aB36PNRsRfv9q9NyU6fzbnF5ai7gndzt+qP198l gpRYijMSDbWYi4oTATBXu+jAAQAA 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)(39410400002)(39400400002)(39850400002)(39840400002)(39450400003)(2980300002)(438002)(189002)(199003)(9170700003)(478600001)(1076002)(36756003)(2906002)(77096006)(72206003)(33646002)(5003940100001)(5660300001)(81166006)(86362001)(8676002)(189998001)(76176999)(50986999)(50226002)(47776003)(2950100002)(4326008)(48376002)(8936002)(38730400002)(54906002)(356003)(53936002)(6666003)(305945005)(110136004)(6916009); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR0401MB1457; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT005; 1:qqEtP5+2OtKsTimQbm7CzaUxnf1uLwlPF0pEYQzbABQsXBmM6aB0DJbuoOr5UASZ2kWX+YdK9GpaC2rdir/W0oeTSs4jkv3TrfB3z/nUjbRisFPHxchPgolsIUdHe8T9wtsBOSLOY/CxRq2c6XedM3nolVOEMjLxnRdmTcUJK+Xnk8aFcOlwqTh2fnWKvz6syDhZASeFis76YpbtIYnuFqPSWHXKKqCfLiWrE16uaZ1T8x070v30WWWQh/q9TISa+Z7JKUnLbOUJNVIifQGb+PxIP00kjsLbthIp0gpHhojnAwcQVqjbtaCK05qBPwaydt24Pm0WYN7lMI1OzmvXoenOPRD20+3TJX9yLLJi53FG+Gg5hZsom5giVDUUXDsVs3K6YKBMhFsXVomKMKRwbT9V7SJuUJyyKU1qeoQahnS7J0SnB0Qoi5Cj79aBYvstpiFnJnt2g4cekiV+woo96GEYm2oJ7stsZ28CN1N/iBbsRg5+F96Lx70wb4I7T7fDhFVmx2vQubIf4nSXz7CBcfxNwEjQvsjXARv6kX8j+ce8nvTR/Tx64+M2nWRHsluv X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PR0401MB1457: X-MS-Office365-Filtering-Correlation-Id: 349f40d2-1d24-4804-a724-08d4ae948e78 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BN3PR0401MB1457; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0401MB1457; 3:HWf3w0c3zspZY6dtIbDXydKS7iu3+l5vuyiQ827LKhShtU1AMZMF++1Q2Y/0rXUIrgtpd7SpRtNUQN6lzL5fCq8DhjbLHvGP6PEej1bqa/0HBw6QpM7jKy1k0zevfT88xj+tyhoVsyxSQd55u9V4ZAFkdRQESQI3LnpQntQxg9nz43RZglgDJOR7tyOKnhZQzcVY05q2rAzL9khllyToyEYtAi23PVkn9mh63FnaCtDLVbXreWoAXVyKc2N+MHVAldlkRjGSzO30/VocYF5vWlwo70X0T1dmm0kVL/rn2wkvYqSrmAE1vzCpFrMCbLnTXNCgRTKz1wygvhYLXAn+ptEKeIzIltd1hXS3c996eT7ve5H+ef5lqKwNZasNnL2X3ang1O3BBTKNpGxubK6vFNicAtnLZX0lCTRPeGRjOAztufvAMTuKLErzpK14GBaZHIE5v1QqFYHm/FN//Gac3uLLvS2SKXzwPXDbUD8yhh7PzY5qsgoKcDNHLIzzmp17 X-Microsoft-Exchange-Diagnostics: 1; BN3PR0401MB1457; 25:8SxE/ez134WrWOmLyn7QN0Mz1X2M77+kjlzX/LhdUhRETQRhuP3SfGzavTD4JYjOS3nLItKxlA8Yb9p0dmrXfxmCTh65+gtclmgdnOtKWge83zFBERaYUaArn71fkIT7HHAHuqmkhskIZTRU8q1POCcqoaX6rtXdI7QBev23QADS7X20M1nAxIxx5oOAf2M/5OlXX39cWkiRbFu28z8LWpookuU7JCLaTVA591F0Iq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Zgs8d5uNgN4BFNpI12PMGd4S7vMkomNktJqDG+ X-Microsoft-Antispam-PRVS: <BN3PR0401MB1457A114ED44365B604D91B581C90@BN3PR0401MB1457.namprd04.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(42932892334569)(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13018025)(13016025)(8121501046)(5005006)(93006095)(93004095)(3002001)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123555025)(20161123558100)(20161123564025)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR0401MB1457; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR0401MB1457; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0401MB1457; 4:AyiaM2SGgaBvhVYdeX0IHrv1oQnCwytWhQFkjcjg?= =?us-ascii?Q?s8KOuUzcLIFBTKf5W930AfYClAQYZEJLkLhS5UXtZ5cNyZyAkzssuAU6UHAo?= =?us-ascii?Q?k5MMNICqbCKcg9qUVuYF+nQWtNPyCa3S0K+x+kMVNPN8HMx0oe8vQM+XMfQ8?= =?us-ascii?Q?KXldkxLi4seXlQ+35Gb04b4CH7XA7CP2cmYUHWnd8Dlu3aiV5OwUVy59EyD5?= =?us-ascii?Q?GV4Ss8Q31QDXa12WdsZVVEJDmGcKGkDdPxrV1jAW12Gn7r9PLD95en8Dakxe?= =?us-ascii?Q?8k76Ft5hs5YyNAePOApmZfpM0h85R1A9wdB73tVpRDG04ChpKHcccz5RAwIK?= =?us-ascii?Q?TjgmDgBzWrOntgcl0JYQmGg55TPWNNazpDFdRb8RSXmBbSNyCLsm8kEw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kfQ0Kjf1XmzE8UxOiMta8qpczrjMi/92S3icYmr?= =?us-ascii?Q?Jm4G6AP74WJlZVfnLdvZ/hM=3D?= X-Forefront-PRVS: 0332AACBC3 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0401MB1457; 23:GROVFLiuozruF0ymVtFsHi0YaICmTwas+fLeDTd?= =?us-ascii?Q?0ditXPcD9QQCrBYMpRvTggJ9CBuy5pqzYzlHDZQqJaLzxyJNlm5wuic1pTMA?= =?us-ascii?Q?CTHjxjXqfLotQEGmxaUONxHMQNzV5RQKqTyLKF/TY+2k2hf9M1U55I9GSJNp?= =?us-ascii?Q?vFITkAkxNWje8BS1plImGgT3OeTN8YliCXLP8pHfLbGVGEXsyXq/e0z9c7ue?= =?us-ascii?Q?BSOREyMQOfoyOa0YIzYn95RIl07sCRgXgmEP/+KkW8Bwu1xTFAWJ7bp/j9GO?= =?us-ascii?Q?PKV//TWry3iFtBPRBUYdDuPYlIhVD5V9FYTKAV+91h0sKjG2jqgxCzb/FBkD?= =?us-ascii?Q?z25PudJFZZP5/islkWP8tCXOrC8BhNKUPxJtCf5zPDFMVX0ouPtPsBez1gLj?= =?us-ascii?Q?Xkss1CedrTU7pPtHNhUpAyN7LhRT1MIaj9/D4o7idPFUo+g9LMQq7uNGKQ6v?= =?us-ascii?Q?kaRHN3UmsLSWU8OTddSv8B681WmS9iWGlv1gWiSpCXVPryrpXBkrxx9NAAgo?= =?us-ascii?Q?3Y5MWGWnkJxXZGOlhQozYcT2bi8oysJ2kV84lM1xLSlPoUz9uorwqiBKzMxz?= =?us-ascii?Q?507cpm+jfi9oTAZQMV9W9qlOee7NGGBCvYiUgHaM8TXzDEN9+ouLujNy1uFf?= =?us-ascii?Q?86ezTzB22Zw5HD2ls8YQOzsGTTaQDajgRUTiSeDDXJMn66DpWrt+gnz7s7kC?= =?us-ascii?Q?tP/jWoSc3bQuO5ISYHL4/lLTFfI4y6mhKUnv6Z/OqK3IYQsp+yG56KKc4N7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4rm/5r/zfUCnm02dN6LrYiKSzE9R5b+ds3bBDKyCM0dVdFzc9+VYuIlI8bbh3BzX1WdEkudAutuojsHPQU= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2017 17:34:03.0045 (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: BN3PR0401MB1457 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 |
diff --git a/block/blk-core.c b/block/blk-core.c index 3bc431a77309..86fc08898fac 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1308,12 +1308,25 @@ 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)) + goto out; + + if (q->mq_ops && q->mq_ops->initialize_rq_fn) + q->mq_ops->initialize_rq_fn(req); + else if (!q->mq_ops && q->initialize_rq_fn) + q->initialize_rq_fn(req); + +out: + return req; } EXPORT_SYMBOL(blk_get_request); diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index a4759fd34e7e..61125d200492 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -143,6 +143,8 @@ struct blk_mq_ops { init_request_fn *init_request; exit_request_fn *exit_request; reinit_request_fn *reinit_request; + /* Called from inside blk_get_request() */ + void (*initialize_rq_fn)(struct request *rq); map_queues_fn *map_queues; 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 request 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 new callback functions to struct request_queue and to struct blk_mq_ops. 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 | 17 +++++++++++++++-- include/linux/blk-mq.h | 2 ++ include/linux/blkdev.h | 4 ++++ 3 files changed, 21 insertions(+), 2 deletions(-)