From patchwork Wed May 31 22:52: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: 9758483 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 D333B60360 for ; Wed, 31 May 2017 22:53:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1A012766D for ; Wed, 31 May 2017 22:53:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6219284D2; Wed, 31 May 2017 22:53:13 +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 93E182766D for ; Wed, 31 May 2017 22:53:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751186AbdEaWxL (ORCPT ); Wed, 31 May 2017 18:53:11 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:64010 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750977AbdEaWxF (ORCPT ); Wed, 31 May 2017 18:53:05 -0400 X-IronPort-AV: E=Sophos;i="5.39,276,1493654400"; d="scan'208";a="118884969" Received: from mail-co1nam03lp0019.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) ([216.32.181.19]) by ob1.hgst.iphmx.com with ESMTP; 01 Jun 2017 07:06:32 +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=rh9mwXFyPOl8YeRXDRStDiHaxjmzBV7jVxLCPSr0LJo=; b=fRdxLc3LACMsFyl+5R79JwYRHOeKrf7AsoqBXzRaSx2Smpm6+5ZkJ064AkzERHsgOuryAoUxsLdzY78C7iYPiJj6mdgjlA+gn/DITHwmNSxnA4Obc91WyJ8/2KNJRSuG7C6NFwEdG1IuQbc2SLOVuFky4368OPpqyHyeNcjda0k= Received: from BLUPR0401CA0014.namprd04.prod.outlook.com (2a01:111:e400:525a::24) by DM2PR0401MB0927.namprd04.prod.outlook.com (2a01:111:e400:3c0c::21) 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:58 +0000 Received: from SN1NAM04FT058.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::201) by BLUPR0401CA0014.outlook.office365.com (2a01:111:e400:525a::24) 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:56 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; lst.de; dkim=none (message not signed) header.d=none;lst.de; 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 SN1NAM04FT058.mail.protection.outlook.com (10.152.89.64) 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:55 +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 B1.05.51736.6494F295; Wed, 31 May 2017 15:52:54 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.8.100) 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:50 -0700 X-AuditID: 0ac94369-6dc8f9800000ca18-a6-592f49463ba2 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id D0.2F.18148.1494F295; Wed, 31 May 2017 15:52:49 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Christoph Hellwig , "Bart Van Assche" , Hannes Reinecke , "Omar Sandoval" Subject: [PATCH v2 12/12] block: Rename blk_mq_rq_{to,from}_pdu() Date: Wed, 31 May 2017 15:52:46 -0700 Message-ID: <20170531225246.26261-13-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+NgFnrALMWRmVeSWpSXmKPExsXCddJ5ka6bp36kwZrHchar7/azWSx4s5fN YuXqo0wWe29pWxy+d5XFgdVjYvM7do/LZ0s9dt9sYPNYv+Uqi8fnTXIBrFFcNimpOZllqUX6 dglcGSf3vWEqmLOWqWLb3OVsDYzHfzF2MXJySAiYSDzrv8naxcjFISSwlEli5tXr7BDODkaJ ucv2s8BUzVyxhgkisZlRYsKcBnaQBJuAkcS39zPBikQEFCR6fq9kAyliFtjCKHFh62qgHRwc wgKOEq+PJIDUsAioSsxatIsNJMwr4CCx8HQlxHx5ibNbdjKD2JxA4dXbT4CNFxKwl9h05DHY SAmBaawSGz9dYwVJ8AoISpyc+QRsL7OAhMTBFy+YIRrUJU4umc80g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ront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39840400002)(39400400002)(39860400002)(39450400003)(39410400002)(39850400002)(2980300002)(438002)(9170700003)(53936002)(8676002)(33646002)(2906002)(77096006)(356003)(81166006)(54906002)(4326008)(53946003)(8936002)(106466001)(110136004)(38730400002)(189998001)(1076002)(5003940100001)(50986999)(50466002)(48376002)(86362001)(478600001)(575784001)(36756003)(50226002)(6666003)(2950100002)(76176999)(6916009)(72206003)(5660300001)(305945005)(47776003)(142933001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0401MB0927; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT058; 1:QE16pDAxRoYJA6r98j+xa4w3Di0YLSZTAyMGoQS3/2qNCTUn5KCDk+Qb6vpAkbBHZvxcTw0F41BRZfGu1pysSwIeUTZ0thhbm3nSir+FrhNGyWnIlpgVxPG7i7a1EP85tTRrMB1qROdiZW9KKOzRReIyTubm+r009sjJSjaSGIOoHcQ8nAUNzA0SgvQlNqwpI52j6e1blc36dYBYz0M/N+11ou5wJQTv72wOAd/Dm3SehIj6yJ3Tr1Yd1m9dvEJUqNgotp89yc8V6XThYBzmDxMdutfzSmWXbd3lRUWEp8GlNbnIshGhv7bGPtEnSxwQRIzD2aGYoVxizyTcFbf4a2xKaKmWX7E4dcuw7DMQje7VzfBvRs49GTN8mQxGunSIXo+NvJrnqXlaa7j848RGQLmG2M4mgrfYoOh7VGqbRNsgnbvuEniJpRfswbhPxuBd21/N37bKcyVV5Uq7RL46xryUZv0FTLiHMyV2gtQQ6/S5S4bUlYUtEEv89sOGa91VsWCxQn7k5NOIysyFCG6JQs/qW9bSEKSIvtNRQYVOI3A= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR0401MB0927: X-MS-Office365-Filtering-Correlation-Id: 93d8a5c0-7f20-410f-f0cb-08d4a877c738 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:DM2PR0401MB0927; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0401MB0927; 3:kzmKIIC6TCJi4u7AziSP8iKzqjq/x81Ekxdpky6yqUNlq0XHCfNwIo08Y132Vh9dLfWkA8997UI8BJqsTqNMrrfYJGEuVgTy57T5Fw/+XUAwcARXx7E+x483quD+SLdUJRVY4ryQpAdiPOxarctis64sLh1hD8xWMInrCJCwhFza5CEr4Fzsm/k/8RolNKPDlbJDM1CeTYXKYrCCND+3e0Q1/R3PgX2yh3s31dkevnqGDGhCgrI+7+/ZWEGYhD9CKgzOubwtZXcxlFJmaL6lmfpW+/3GyNQXgm6ggVlSsufIA3Uzweik1Zol1QUwlfvbJntT2QebxqF3m9U49kqV9zc6lodp+CLsWymPZuW9fX3ueAPYdu01M0TjfnCl25m4I9XWLF5o9LglklR7aiYdkxnYy0FLhogMiXnE7UH76PBm6OVdYsSeTZAbid9arDhEohXN5EWrWO+jVEzUvm265TZjEyt8Rw7f9Kk/Samj1/RsB31xtdwaD4THOQ5+Ud2a7YmN1fppbSOUFEU1YCKnRg== X-Microsoft-Exchange-Diagnostics: 1; DM2PR0401MB0927; 25:2YwuheJeAYjqfHD2PGduLhhnMOoKZROyniejyueunuLqEGFsypXyHS0xdPozdvmrOymvfWGirQ3EZ8+mJ1jI8JMbIMbbxyMRzxPswCICADZpRte9sI9iFDdkVQMj90p3bL0yHS0e6W9eD5xwmN8mPf2wrru9pRIRG1Aiauy2RkDLZWD3QS4Y2J4tR44FyT5RUVzmM5vMRt9KghrBqrQ+t4gOwaX780jEgK0gHkDq95G+NiUFc3s1zSd437ZdwUCHzv7NT7rirxWwUnYujOYMjROTWFFm95bkxSS5/VLUEoCC9FEhVyT/Rbz4Y8ugR8nJzjr1KWC1CMWNme7/eirTqtTdJIDskPn+KuBDlM9XW54SUwk2wF8QLDnyq0xvxkQweIgC+uuJI3l6rnFeCU9+3EZOA85GFbjLFv0xO50x3mU3A2hELoiRi5nYl+I2n56cXxTBN9J1miRDnd1oKCzUDgbsq+PIx7KPG8JgXaFrKwY=; 31:cTGIFoRFOK8qCXqr1zYmX+nWZL68P1UeW6zVDjwhXuBDpt14bKZQITwznEo8sv0yqbEFP8BqXYJ853GUklnWcJ5JXrjMz2amvNcE1mv69TtWCcouQo/vRQ2LSQyjwwTBSlEfU74N8p5CY6BMeLMTHrxUuo4dEEZ7heUDqY6Oa1iCgiyVzPaCwRpmjzUSK0A8nu6bhSRFevXzSmL8bOdCGTeWesR7r3Haf54OaZGiCNqwqjypdBV5OnlXFqarEFtumoOrKbakQz2KwlvWzQ0nbg== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; DM2PR0401MB0927; 20:fzCMOX0haf2/kExpVmkrLRMlgNKZlL1iIDBa1xQ2fFU104HKEqyfHlDxG+sfnGlNFUC6ZmheV2HKVfXm9qymstxvvuHr56/FQR6CMbZqQA4lHsQAvwkJPrfgb74yvP1XCKeFLmSV/CkNTH5Hv45wFsSsfD5f5zPf6CSZt75yYKAx37l4fOsq3rVG0ALK43WYII5g8xCs35azMesF/+qBi24jQI90YfRwkOqFYUgXh6PeSTtxMuz6ZUohtRxQq5PsbuOVffci6qfb7WeyZeaLvhKRO4TRG84DnPkT531CO23UDm3/ji9iAM2ZR+K6BCkh0oTHpSaVc8e7jIWlGmxWJinwFlZqYpvxyF/JCkMhN+gwnuVCcPpvD077NGWaJ3z47UQUheRS1OTBgkydOwGXMS/WaoGbYZThTlTNwQuvkg3klLdDSb3EjLzTNM2lCWwtggnkN8qn4t2Uwd7VWvppTK76H1gTWqrhHlOCD3ZkuJZNsHQwco/U3Zfuk7Ld1S5H X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484)(42932892334569)(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700073)(100105000095)(100000701073)(100105300095)(100000702073)(100105100095)(6040450)(601004)(2401047)(13016025)(5005006)(8121501046)(13018025)(10201501046)(3002001)(93006095)(93004095)(100000703073)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123555025)(20161123558100)(20161123562025)(6072148)(100000704073)(100105200095)(100000705073)(100105500095); SRVR:DM2PR0401MB0927; BCL:0; PCL:0; RULEID:(100000800073)(100110000095)(100000801073)(100110300095)(100000802073)(100110100095)(100000803073)(100110400095)(100000804073)(100110200095)(100000805073)(100110500095); SRVR:DM2PR0401MB0927; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0401MB0927; 4:EyqMjEs2mPiaKEy44bav64N+gP1fdYHC5GavbUGF?= =?us-ascii?Q?DwmA+m/7qrq/FXZJbpY60NqQsGpRRBCEWDTKknI50MnebiLut1BRpNhozJMz?= =?us-ascii?Q?juVDXymFDx7Q84jWjeKlQDq8ary3sjZcmaVxbmwlQFOBX6cr3rDJDd74Z7GL?= =?us-ascii?Q?7cEUrdAcPu/OTtNLwUGLHRch6W/GsYResOk39CN22W5Iy2WgixLRkDvlGX4j?= =?us-ascii?Q?jBajcTJKmOl/U/1ShhYum4lNwuMOuG3oDwDZcWsTCONheEvWf/wnEHbg4NiK?= =?us-ascii?Q?uzSKlBEo7/FBQy08yloYLI45qa5me9YM8w1yssgIOnFl3XH2jluiom83r9So?= =?us-ascii?Q?3Sk1T6W6pjiVt/9GfmsKHxeLfNodFSpBSjYHGUjhISW37/6Ewxf3xh5G2SzC?= =?us-ascii?Q?0Vgsun6EMIu9SOm+yB08W8bwHvrN5jDf5e7wtAqEdUtGLlRcRWOMujC81TVf?= =?us-ascii?Q?JvHSiTrRP/HxxhevfW9ZIvE9mURULDNyJO2djgxK1nA5PLeYegksyRYnBnML?= =?us-ascii?Q?5G72+Qv0PIeJmTZVyfVOpnb7QSqdQzSY/F6x173xlcA5T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X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2017 22:52:55.7898 (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: DM2PR0401MB0927 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 Commit 6d247d7f71d1 ("block: allow specifying size for extra command data") added support for .cmd_size to blk-sq. Due to that patch the blk_mq_rq_{to,from}_pdu() functions are also useful for single-queue block drivers. Hence remove "_mq" from the name of these functions. This patch does not change any functionality. Most of this patch has been generated by running the following shell command: sed -i 's/blk_mq_rq_to_pdu/blk_rq_to_pdu/g; s/blk_mq_rq_from_pdu/blk_rq_from_pdu/g' \ $(git grep -lE 'blk_mq_rq_(to|from)_pdu') Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Omar Sandoval --- drivers/block/loop.c | 8 ++++---- drivers/block/mtip32xx/mtip32xx.c | 28 ++++++++++++++-------------- drivers/block/nbd.c | 18 +++++++++--------- drivers/block/null_blk.c | 4 ++-- drivers/block/rbd.c | 6 +++--- drivers/block/virtio_blk.c | 12 ++++++------ drivers/block/xen-blkfront.c | 2 +- drivers/ide/ide-probe.c | 2 +- drivers/md/dm-rq.c | 6 +++--- drivers/mtd/ubi/block.c | 8 ++++---- drivers/nvme/host/fc.c | 20 ++++++++++---------- drivers/nvme/host/nvme.h | 2 +- drivers/nvme/host/pci.c | 22 +++++++++++----------- drivers/nvme/host/rdma.c | 18 +++++++++--------- drivers/nvme/target/loop.c | 10 +++++----- drivers/scsi/scsi_lib.c | 18 +++++++++--------- include/linux/blk-mq.h | 13 ------------- include/linux/blkdev.h | 13 +++++++++++++ include/linux/ide.h | 2 +- include/scsi/scsi_request.h | 2 +- 20 files changed, 107 insertions(+), 107 deletions(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 28d932906f24..42e18601daa2 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -447,7 +447,7 @@ static int lo_req_flush(struct loop_device *lo, struct request *rq) static void lo_complete_rq(struct request *rq) { - struct loop_cmd *cmd = blk_mq_rq_to_pdu(rq); + struct loop_cmd *cmd = blk_rq_to_pdu(rq); if (unlikely(req_op(cmd->rq) == REQ_OP_READ && cmd->use_aio && cmd->ret >= 0 && cmd->ret < blk_rq_bytes(cmd->rq))) { @@ -507,7 +507,7 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd, static int do_req_filebacked(struct loop_device *lo, struct request *rq) { - struct loop_cmd *cmd = blk_mq_rq_to_pdu(rq); + struct loop_cmd *cmd = blk_rq_to_pdu(rq); loff_t pos = ((loff_t) blk_rq_pos(rq) << 9) + lo->lo_offset; /* @@ -1645,7 +1645,7 @@ EXPORT_SYMBOL(loop_unregister_transfer); static int loop_queue_rq(struct blk_mq_hw_ctx *hctx, const struct blk_mq_queue_data *bd) { - struct loop_cmd *cmd = blk_mq_rq_to_pdu(bd->rq); + struct loop_cmd *cmd = blk_rq_to_pdu(bd->rq); struct loop_device *lo = cmd->rq->q->queuedata; blk_mq_start_request(bd->rq); @@ -1700,7 +1700,7 @@ static void loop_queue_work(struct kthread_work *work) static int loop_init_request(struct blk_mq_tag_set *set, struct request *rq, unsigned int hctx_idx, unsigned int numa_node) { - struct loop_cmd *cmd = blk_mq_rq_to_pdu(rq); + struct loop_cmd *cmd = blk_rq_to_pdu(rq); cmd->rq = rq; kthread_init_work(&cmd->work, loop_queue_work); diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 3a779a4f5653..7b58a5a16324 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c @@ -173,7 +173,7 @@ static bool mtip_check_surprise_removal(struct pci_dev *pdev) static void mtip_init_cmd_header(struct request *rq) { struct driver_data *dd = rq->q->queuedata; - struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq); + struct mtip_cmd *cmd = blk_rq_to_pdu(rq); u32 host_cap_64 = readl(dd->mmio + HOST_CAP) & HOST_CAP_64; /* Point the command headers at the command tables. */ @@ -202,7 +202,7 @@ static struct mtip_cmd *mtip_get_int_command(struct driver_data *dd) /* Internal cmd isn't submitted via .queue_rq */ mtip_init_cmd_header(rq); - return blk_mq_rq_to_pdu(rq); + return blk_rq_to_pdu(rq); } static struct mtip_cmd *mtip_cmd_from_tag(struct driver_data *dd, @@ -210,7 +210,7 @@ static struct mtip_cmd *mtip_cmd_from_tag(struct driver_data *dd, { struct blk_mq_hw_ctx *hctx = dd->queue->queue_hw_ctx[0]; - return blk_mq_rq_to_pdu(blk_mq_tag_to_rq(hctx->tags, tag)); + return blk_rq_to_pdu(blk_mq_tag_to_rq(hctx->tags, tag)); } /* @@ -534,7 +534,7 @@ static int mtip_get_smart_attr(struct mtip_port *port, unsigned int id, static void mtip_complete_command(struct mtip_cmd *cmd, int status) { - struct request *req = blk_mq_rq_from_pdu(cmd); + struct request *req = blk_rq_from_pdu(cmd); cmd->status = status; blk_mq_complete_request(req); @@ -1033,7 +1033,7 @@ static int mtip_exec_internal_command(struct mtip_port *port, dbg_printk(MTIP_DRV_NAME "Unable to allocate tag for PIO cmd\n"); return -EFAULT; } - rq = blk_mq_rq_from_pdu(int_cmd); + rq = blk_rq_from_pdu(int_cmd); rq->special = &icmd; set_bit(MTIP_PF_IC_ACTIVE_BIT, &port->flags); @@ -2731,7 +2731,7 @@ static int mtip_ftl_rebuild_poll(struct driver_data *dd) static void mtip_softirq_done_fn(struct request *rq) { - struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq); + struct mtip_cmd *cmd = blk_rq_to_pdu(rq); struct driver_data *dd = rq->q->queuedata; /* Unmap the DMA scatter list entries */ @@ -2747,7 +2747,7 @@ static void mtip_softirq_done_fn(struct request *rq) static void mtip_abort_cmd(struct request *req, void *data, bool reserved) { - struct mtip_cmd *cmd = blk_mq_rq_to_pdu(req); + struct mtip_cmd *cmd = blk_rq_to_pdu(req); struct driver_data *dd = data; dbg_printk(MTIP_DRV_NAME " Aborting request, tag = %d\n", req->tag); @@ -3569,7 +3569,7 @@ static inline bool is_se_active(struct driver_data *dd) static int mtip_submit_request(struct blk_mq_hw_ctx *hctx, struct request *rq) { struct driver_data *dd = hctx->queue->queuedata; - struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq); + struct mtip_cmd *cmd = blk_rq_to_pdu(rq); unsigned int nents; if (is_se_active(dd)) @@ -3613,7 +3613,7 @@ static bool mtip_check_unal_depth(struct blk_mq_hw_ctx *hctx, struct request *rq) { struct driver_data *dd = hctx->queue->queuedata; - struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq); + struct mtip_cmd *cmd = blk_rq_to_pdu(rq); if (rq_data_dir(rq) == READ || !dd->unal_qdepth) return false; @@ -3638,7 +3638,7 @@ static int mtip_issue_reserved_cmd(struct blk_mq_hw_ctx *hctx, { struct driver_data *dd = hctx->queue->queuedata; struct mtip_int_cmd *icmd = rq->special; - struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq); + struct mtip_cmd *cmd = blk_rq_to_pdu(rq); struct mtip_cmd_sg *command_sg; if (mtip_commands_active(dd->port)) @@ -3696,7 +3696,7 @@ static void mtip_free_cmd(struct blk_mq_tag_set *set, struct request *rq, unsigned int hctx_idx) { struct driver_data *dd = set->driver_data; - struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq); + struct mtip_cmd *cmd = blk_rq_to_pdu(rq); if (!cmd->command) return; @@ -3709,7 +3709,7 @@ static int mtip_init_cmd(struct blk_mq_tag_set *set, struct request *rq, unsigned int hctx_idx, unsigned int numa_node) { struct driver_data *dd = set->driver_data; - struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq); + struct mtip_cmd *cmd = blk_rq_to_pdu(rq); cmd->command = dmam_alloc_coherent(&dd->pdev->dev, CMD_DMA_ALLOC_SZ, &cmd->command_dma, GFP_KERNEL); @@ -3728,7 +3728,7 @@ static enum blk_eh_timer_return mtip_cmd_timeout(struct request *req, struct driver_data *dd = req->q->queuedata; if (reserved) { - struct mtip_cmd *cmd = blk_mq_rq_to_pdu(req); + struct mtip_cmd *cmd = blk_rq_to_pdu(req); cmd->status = -ETIME; return BLK_EH_HANDLED; @@ -3959,7 +3959,7 @@ static int mtip_block_initialize(struct driver_data *dd) static void mtip_no_dev_cleanup(struct request *rq, void *data, bool reserv) { - struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq); + struct mtip_cmd *cmd = blk_rq_to_pdu(rq); cmd->status = -ENODEV; blk_mq_complete_request(rq); diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index c5e52f66d3d4..271552fe27f1 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -248,7 +248,7 @@ static void nbd_size_set(struct nbd_device *nbd, loff_t blocksize, static void nbd_complete_rq(struct request *req) { - struct nbd_cmd *cmd = blk_mq_rq_to_pdu(req); + struct nbd_cmd *cmd = blk_rq_to_pdu(req); dev_dbg(nbd_to_dev(cmd->nbd), "request %p: %s\n", cmd, cmd->status ? "failed" : "done"); @@ -281,7 +281,7 @@ static void sock_shutdown(struct nbd_device *nbd) static enum blk_eh_timer_return nbd_xmit_timeout(struct request *req, bool reserved) { - struct nbd_cmd *cmd = blk_mq_rq_to_pdu(req); + struct nbd_cmd *cmd = blk_rq_to_pdu(req); struct nbd_device *nbd = cmd->nbd; struct nbd_config *config; @@ -390,7 +390,7 @@ static int sock_xmit(struct nbd_device *nbd, int index, int send, /* always call with the tx_lock held */ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index) { - struct request *req = blk_mq_rq_from_pdu(cmd); + struct request *req = blk_rq_from_pdu(cmd); struct nbd_config *config = nbd->config; struct nbd_sock *nsock = config->socks[index]; int result; @@ -574,7 +574,7 @@ static struct nbd_cmd *nbd_read_stat(struct nbd_device *nbd, int index) tag, req); return ERR_PTR(-ENOENT); } - cmd = blk_mq_rq_to_pdu(req); + cmd = blk_rq_to_pdu(req); if (ntohl(reply.error)) { dev_err(disk_to_dev(nbd->disk), "Other side returned error (%d)\n", ntohl(reply.error)); @@ -640,7 +640,7 @@ static void recv_work(struct work_struct *work) break; } - blk_mq_complete_request(blk_mq_rq_from_pdu(cmd)); + blk_mq_complete_request(blk_rq_from_pdu(cmd)); } atomic_dec(&config->recv_threads); wake_up(&config->recv_wq); @@ -654,7 +654,7 @@ static void nbd_clear_req(struct request *req, void *data, bool reserved) if (!blk_mq_request_started(req)) return; - cmd = blk_mq_rq_to_pdu(req); + cmd = blk_rq_to_pdu(req); cmd->status = -EIO; blk_mq_complete_request(req); } @@ -725,7 +725,7 @@ static int wait_for_reconnect(struct nbd_device *nbd) static int nbd_handle_cmd(struct nbd_cmd *cmd, int index) { - struct request *req = blk_mq_rq_from_pdu(cmd); + struct request *req = blk_rq_from_pdu(cmd); struct nbd_device *nbd = cmd->nbd; struct nbd_config *config; struct nbd_sock *nsock; @@ -801,7 +801,7 @@ static int nbd_handle_cmd(struct nbd_cmd *cmd, int index) static int nbd_queue_rq(struct blk_mq_hw_ctx *hctx, const struct blk_mq_queue_data *bd) { - struct nbd_cmd *cmd = blk_mq_rq_to_pdu(bd->rq); + struct nbd_cmd *cmd = blk_rq_to_pdu(bd->rq); int ret; /* @@ -1410,7 +1410,7 @@ static void nbd_dbg_close(void) static int nbd_init_request(struct blk_mq_tag_set *set, struct request *rq, unsigned int hctx_idx, unsigned int numa_node) { - struct nbd_cmd *cmd = blk_mq_rq_to_pdu(rq); + struct nbd_cmd *cmd = blk_rq_to_pdu(rq); cmd->nbd = set->driver_data; return 0; } diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index d946e1eeac8e..e1819f31c0ed 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -269,7 +269,7 @@ static void null_cmd_end_timer(struct nullb_cmd *cmd) static void null_softirq_done_fn(struct request *rq) { if (queue_mode == NULL_Q_MQ) - end_cmd(blk_mq_rq_to_pdu(rq)); + end_cmd(blk_rq_to_pdu(rq)); else end_cmd(rq->special); } @@ -359,7 +359,7 @@ static void null_request_fn(struct request_queue *q) static int null_queue_rq(struct blk_mq_hw_ctx *hctx, const struct blk_mq_queue_data *bd) { - struct nullb_cmd *cmd = blk_mq_rq_to_pdu(bd->rq); + struct nullb_cmd *cmd = blk_rq_to_pdu(bd->rq); might_sleep_if(hctx->flags & BLK_MQ_F_BLOCKING); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 454bf9c34882..c8c1988dff0a 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -4010,7 +4010,7 @@ static void rbd_wait_state_locked(struct rbd_device *rbd_dev) static void rbd_queue_workfn(struct work_struct *work) { - struct request *rq = blk_mq_rq_from_pdu(work); + struct request *rq = blk_rq_from_pdu(work); struct rbd_device *rbd_dev = rq->q->queuedata; struct rbd_img_request *img_request; struct ceph_snap_context *snapc = NULL; @@ -4156,7 +4156,7 @@ static int rbd_queue_rq(struct blk_mq_hw_ctx *hctx, const struct blk_mq_queue_data *bd) { struct request *rq = bd->rq; - struct work_struct *work = blk_mq_rq_to_pdu(rq); + struct work_struct *work = blk_rq_to_pdu(rq); queue_work(rbd_wq, work); return BLK_MQ_RQ_QUEUE_OK; @@ -4351,7 +4351,7 @@ static int rbd_dev_refresh(struct rbd_device *rbd_dev) static int rbd_init_request(struct blk_mq_tag_set *set, struct request *rq, unsigned int hctx_idx, unsigned int numa_node) { - struct work_struct *work = blk_mq_rq_to_pdu(rq); + struct work_struct *work = blk_rq_to_pdu(rq); INIT_WORK(work, rbd_queue_workfn); return 0; diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 553cc4c542b4..712831085da0 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -113,7 +113,7 @@ static int virtblk_add_req_scsi(struct virtqueue *vq, struct virtblk_req *vbr, static inline void virtblk_scsi_request_done(struct request *req) { - struct virtblk_req *vbr = blk_mq_rq_to_pdu(req); + struct virtblk_req *vbr = blk_rq_to_pdu(req); struct virtio_blk *vblk = req->q->queuedata; struct scsi_request *sreq = &vbr->sreq; @@ -174,7 +174,7 @@ static int virtblk_add_req(struct virtqueue *vq, struct virtblk_req *vbr, static inline void virtblk_request_done(struct request *req) { - struct virtblk_req *vbr = blk_mq_rq_to_pdu(req); + struct virtblk_req *vbr = blk_rq_to_pdu(req); switch (req_op(req)) { case REQ_OP_SCSI_IN: @@ -199,7 +199,7 @@ static void virtblk_done(struct virtqueue *vq) do { virtqueue_disable_cb(vq); while ((vbr = virtqueue_get_buf(vblk->vqs[qid].vq, &len)) != NULL) { - struct request *req = blk_mq_rq_from_pdu(vbr); + struct request *req = blk_rq_from_pdu(vbr); blk_mq_complete_request(req); req_done = true; @@ -219,7 +219,7 @@ static int virtio_queue_rq(struct blk_mq_hw_ctx *hctx, { struct virtio_blk *vblk = hctx->queue->queuedata; struct request *req = bd->rq; - struct virtblk_req *vbr = blk_mq_rq_to_pdu(req); + struct virtblk_req *vbr = blk_rq_to_pdu(req); unsigned long flags; unsigned int num; int qid = hctx->queue_num; @@ -307,7 +307,7 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str) goto out; blk_execute_rq(vblk->disk->queue, vblk->disk, req, false); - err = virtblk_result(blk_mq_rq_to_pdu(req)); + err = virtblk_result(blk_rq_to_pdu(req)); out: blk_put_request(req); return err; @@ -576,7 +576,7 @@ static int virtblk_init_request(struct blk_mq_tag_set *set, struct request *rq, unsigned int hctx_idx, unsigned int numa_node) { struct virtio_blk *vblk = set->driver_data; - struct virtblk_req *vbr = blk_mq_rq_to_pdu(rq); + struct virtblk_req *vbr = blk_rq_to_pdu(rq); #ifdef CONFIG_VIRTIO_BLK_SCSI vbr->sreq.sense = vbr->sense; diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 39459631667c..d7b3b6229976 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -121,7 +121,7 @@ struct blkif_req { static inline struct blkif_req *blkif_req(struct request *rq) { - return blk_mq_rq_to_pdu(rq); + return blk_rq_to_pdu(rq); } static DEFINE_MUTEX(blkfront_mutex); diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 01b2adfd8226..38b4356639fe 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -743,7 +743,7 @@ static void ide_port_tune_devices(ide_hwif_t *hwif) static void ide_initialize_rq(struct request *rq) { - struct ide_request *req = blk_mq_rq_to_pdu(rq); + struct ide_request *req = blk_rq_to_pdu(rq); scsi_req_init(&req->sreq); req->sreq.sense = req->sense; diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c index b639fa7246ee..3c0725e414fa 100644 --- a/drivers/md/dm-rq.c +++ b/drivers/md/dm-rq.c @@ -163,7 +163,7 @@ static void end_clone_bio(struct bio *clone) static struct dm_rq_target_io *tio_from_request(struct request *rq) { - return blk_mq_rq_to_pdu(rq); + return blk_rq_to_pdu(rq); } static void rq_end_stats(struct mapped_device *md, struct request *orig) @@ -551,7 +551,7 @@ static void dm_start_request(struct mapped_device *md, struct request *orig) static int __dm_rq_init_rq(struct mapped_device *md, struct request *rq) { - struct dm_rq_target_io *tio = blk_mq_rq_to_pdu(rq); + struct dm_rq_target_io *tio = blk_rq_to_pdu(rq); /* * Must initialize md member of tio, otherwise it won't @@ -731,7 +731,7 @@ static int dm_mq_queue_rq(struct blk_mq_hw_ctx *hctx, const struct blk_mq_queue_data *bd) { struct request *rq = bd->rq; - struct dm_rq_target_io *tio = blk_mq_rq_to_pdu(rq); + struct dm_rq_target_io *tio = blk_rq_to_pdu(rq); struct mapped_device *md = tio->md; struct dm_target *ti = md->immutable_target; diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c index 5497e65439df..7eacc6fdc39f 100644 --- a/drivers/mtd/ubi/block.c +++ b/drivers/mtd/ubi/block.c @@ -191,7 +191,7 @@ static int ubiblock_read(struct ubiblock_pdu *pdu) { int ret, leb, offset, bytes_left, to_read; u64 pos; - struct request *req = blk_mq_rq_from_pdu(pdu); + struct request *req = blk_rq_from_pdu(pdu); struct ubiblock *dev = req->q->queuedata; to_read = blk_rq_bytes(req); @@ -299,7 +299,7 @@ static void ubiblock_do_work(struct work_struct *work) { int ret; struct ubiblock_pdu *pdu = container_of(work, struct ubiblock_pdu, work); - struct request *req = blk_mq_rq_from_pdu(pdu); + struct request *req = blk_rq_from_pdu(pdu); blk_mq_start_request(req); @@ -321,7 +321,7 @@ static int ubiblock_queue_rq(struct blk_mq_hw_ctx *hctx, { struct request *req = bd->rq; struct ubiblock *dev = hctx->queue->queuedata; - struct ubiblock_pdu *pdu = blk_mq_rq_to_pdu(req); + struct ubiblock_pdu *pdu = blk_rq_to_pdu(req); switch (req_op(req)) { case REQ_OP_READ: @@ -338,7 +338,7 @@ static int ubiblock_init_request(struct blk_mq_tag_set *set, struct request *req, unsigned int hctx_idx, unsigned int numa_node) { - struct ubiblock_pdu *pdu = blk_mq_rq_to_pdu(req); + struct ubiblock_pdu *pdu = blk_rq_to_pdu(req); sg_init_table(pdu->usgl.sg, UBI_MAX_SG_COUNT); INIT_WORK(&pdu->work, ubiblock_do_work); diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index 5b14cbefb724..c62cf5626e91 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c @@ -1143,7 +1143,7 @@ static void __nvme_fc_final_op_cleanup(struct request *rq); static int nvme_fc_reinit_request(void *data, struct request *rq) { - struct nvme_fc_fcp_op *op = blk_mq_rq_to_pdu(rq); + struct nvme_fc_fcp_op *op = blk_rq_to_pdu(rq); struct nvme_fc_cmd_iu *cmdiu = &op->cmd_iu; memset(cmdiu, 0, sizeof(*cmdiu)); @@ -1171,7 +1171,7 @@ static void nvme_fc_exit_request(struct blk_mq_tag_set *set, struct request *rq, unsigned int hctx_idx) { - struct nvme_fc_fcp_op *op = blk_mq_rq_to_pdu(rq); + struct nvme_fc_fcp_op *op = blk_rq_to_pdu(rq); return __nvme_fc_exit_request(set->driver_data, op); } @@ -1434,7 +1434,7 @@ nvme_fc_init_request(struct blk_mq_tag_set *set, struct request *rq, unsigned int hctx_idx, unsigned int numa_node) { struct nvme_fc_ctrl *ctrl = set->driver_data; - struct nvme_fc_fcp_op *op = blk_mq_rq_to_pdu(rq); + struct nvme_fc_fcp_op *op = blk_rq_to_pdu(rq); struct nvme_fc_queue *queue = &ctrl->queues[hctx_idx+1]; return __nvme_fc_init_request(ctrl, queue, op, rq, queue->rqcnt++); @@ -1445,7 +1445,7 @@ nvme_fc_init_admin_request(struct blk_mq_tag_set *set, struct request *rq, unsigned int hctx_idx, unsigned int numa_node) { struct nvme_fc_ctrl *ctrl = set->driver_data; - struct nvme_fc_fcp_op *op = blk_mq_rq_to_pdu(rq); + struct nvme_fc_fcp_op *op = blk_rq_to_pdu(rq); struct nvme_fc_queue *queue = &ctrl->queues[0]; return __nvme_fc_init_request(ctrl, queue, op, rq, queue->rqcnt++); @@ -1770,7 +1770,7 @@ nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg) static enum blk_eh_timer_return nvme_fc_timeout(struct request *rq, bool reserved) { - struct nvme_fc_fcp_op *op = blk_mq_rq_to_pdu(rq); + struct nvme_fc_fcp_op *op = blk_rq_to_pdu(rq); struct nvme_fc_ctrl *ctrl = op->ctrl; int ret; @@ -1986,7 +1986,7 @@ nvme_fc_queue_rq(struct blk_mq_hw_ctx *hctx, struct nvme_fc_queue *queue = hctx->driver_data; struct nvme_fc_ctrl *ctrl = queue->ctrl; struct request *rq = bd->rq; - struct nvme_fc_fcp_op *op = blk_mq_rq_to_pdu(rq); + struct nvme_fc_fcp_op *op = blk_rq_to_pdu(rq); struct nvme_fc_cmd_iu *cmdiu = &op->cmd_iu; struct nvme_command *sqe = &cmdiu->sqe; enum nvmefc_fcp_datadir io_dir; @@ -2029,7 +2029,7 @@ nvme_fc_poll(struct blk_mq_hw_ctx *hctx, unsigned int tag) if (!req) return 0; - op = blk_mq_rq_to_pdu(req); + op = blk_rq_to_pdu(req); if ((atomic_read(&op->state) == FCPOP_STATE_ACTIVE) && (ctrl->lport->ops->poll_queue)) @@ -2071,7 +2071,7 @@ nvme_fc_submit_async_event(struct nvme_ctrl *arg, int aer_idx) static void __nvme_fc_final_op_cleanup(struct request *rq) { - struct nvme_fc_fcp_op *op = blk_mq_rq_to_pdu(rq); + struct nvme_fc_fcp_op *op = blk_rq_to_pdu(rq); struct nvme_fc_ctrl *ctrl = op->ctrl; atomic_set(&op->state, FCPOP_STATE_IDLE); @@ -2088,7 +2088,7 @@ __nvme_fc_final_op_cleanup(struct request *rq) static void nvme_fc_complete_rq(struct request *rq) { - struct nvme_fc_fcp_op *op = blk_mq_rq_to_pdu(rq); + struct nvme_fc_fcp_op *op = blk_rq_to_pdu(rq); struct nvme_fc_ctrl *ctrl = op->ctrl; unsigned long flags; bool completed = false; @@ -2130,7 +2130,7 @@ nvme_fc_terminate_exchange(struct request *req, void *data, bool reserved) { struct nvme_ctrl *nctrl = data; struct nvme_fc_ctrl *ctrl = to_fc_ctrl(nctrl); - struct nvme_fc_fcp_op *op = blk_mq_rq_to_pdu(req); + struct nvme_fc_fcp_op *op = blk_rq_to_pdu(req); unsigned long flags; int status; diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 9d6a070d4391..575871ca7ef3 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -96,7 +96,7 @@ enum { static inline struct nvme_request *nvme_req(struct request *req) { - return blk_mq_rq_to_pdu(req); + return blk_rq_to_pdu(req); } /* The below value is the specific amount of delay needed before checking diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index d52701df7245..2011540214a1 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -355,7 +355,7 @@ static int nvme_admin_init_request(struct blk_mq_tag_set *set, unsigned int numa_node) { struct nvme_dev *dev = set->driver_data; - struct nvme_iod *iod = blk_mq_rq_to_pdu(req); + struct nvme_iod *iod = blk_rq_to_pdu(req); struct nvme_queue *nvmeq = dev->queues[0]; BUG_ON(!nvmeq); @@ -381,7 +381,7 @@ static int nvme_init_request(struct blk_mq_tag_set *set, struct request *req, unsigned int hctx_idx, unsigned int numa_node) { struct nvme_dev *dev = set->driver_data; - struct nvme_iod *iod = blk_mq_rq_to_pdu(req); + struct nvme_iod *iod = blk_rq_to_pdu(req); struct nvme_queue *nvmeq = dev->queues[hctx_idx + 1]; BUG_ON(!nvmeq); @@ -423,13 +423,13 @@ static void __nvme_submit_cmd(struct nvme_queue *nvmeq, static __le64 **iod_list(struct request *req) { - struct nvme_iod *iod = blk_mq_rq_to_pdu(req); + struct nvme_iod *iod = blk_rq_to_pdu(req); return (__le64 **)(iod->sg + blk_rq_nr_phys_segments(req)); } static int nvme_init_iod(struct request *rq, struct nvme_dev *dev) { - struct nvme_iod *iod = blk_mq_rq_to_pdu(rq); + struct nvme_iod *iod = blk_rq_to_pdu(rq); int nseg = blk_rq_nr_phys_segments(rq); unsigned int size = blk_rq_payload_bytes(rq); @@ -451,7 +451,7 @@ static int nvme_init_iod(struct request *rq, struct nvme_dev *dev) static void nvme_free_iod(struct nvme_dev *dev, struct request *req) { - struct nvme_iod *iod = blk_mq_rq_to_pdu(req); + struct nvme_iod *iod = blk_rq_to_pdu(req); const int last_prp = dev->ctrl.page_size / 8 - 1; int i; __le64 **list = iod_list(req); @@ -539,7 +539,7 @@ static void nvme_dif_complete(u32 p, u32 v, struct t10_pi_tuple *pi) static bool nvme_setup_prps(struct nvme_dev *dev, struct request *req) { - struct nvme_iod *iod = blk_mq_rq_to_pdu(req); + struct nvme_iod *iod = blk_rq_to_pdu(req); struct dma_pool *pool; int length = blk_rq_payload_bytes(req); struct scatterlist *sg = iod->sg; @@ -619,7 +619,7 @@ static bool nvme_setup_prps(struct nvme_dev *dev, struct request *req) static int nvme_map_data(struct nvme_dev *dev, struct request *req, struct nvme_command *cmnd) { - struct nvme_iod *iod = blk_mq_rq_to_pdu(req); + struct nvme_iod *iod = blk_rq_to_pdu(req); struct request_queue *q = req->q; enum dma_data_direction dma_dir = rq_data_dir(req) ? DMA_TO_DEVICE : DMA_FROM_DEVICE; @@ -668,7 +668,7 @@ static int nvme_map_data(struct nvme_dev *dev, struct request *req, static void nvme_unmap_data(struct nvme_dev *dev, struct request *req) { - struct nvme_iod *iod = blk_mq_rq_to_pdu(req); + struct nvme_iod *iod = blk_rq_to_pdu(req); enum dma_data_direction dma_dir = rq_data_dir(req) ? DMA_TO_DEVICE : DMA_FROM_DEVICE; @@ -746,7 +746,7 @@ static int nvme_queue_rq(struct blk_mq_hw_ctx *hctx, static void nvme_pci_complete_rq(struct request *req) { - struct nvme_iod *iod = blk_mq_rq_to_pdu(req); + struct nvme_iod *iod = blk_rq_to_pdu(req); nvme_unmap_data(iod->nvmeq->dev, req); nvme_complete_rq(req); @@ -941,7 +941,7 @@ static int adapter_delete_sq(struct nvme_dev *dev, u16 sqid) static void abort_endio(struct request *req, int error) { - struct nvme_iod *iod = blk_mq_rq_to_pdu(req); + struct nvme_iod *iod = blk_rq_to_pdu(req); struct nvme_queue *nvmeq = iod->nvmeq; dev_warn(nvmeq->dev->ctrl.device, @@ -952,7 +952,7 @@ static void abort_endio(struct request *req, int error) static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved) { - struct nvme_iod *iod = blk_mq_rq_to_pdu(req); + struct nvme_iod *iod = blk_rq_to_pdu(req); struct nvme_queue *nvmeq = iod->nvmeq; struct nvme_dev *dev = nvmeq->dev; struct request *abort_req; diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 28bd255c144d..ede0e3bdf96d 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -279,7 +279,7 @@ static int nvme_rdma_reinit_request(void *data, struct request *rq) { struct nvme_rdma_ctrl *ctrl = data; struct nvme_rdma_device *dev = ctrl->device; - struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq); + struct nvme_rdma_request *req = blk_rq_to_pdu(rq); int ret = 0; if (!req->mr->need_inval) @@ -304,7 +304,7 @@ static int nvme_rdma_reinit_request(void *data, struct request *rq) static void __nvme_rdma_exit_request(struct nvme_rdma_ctrl *ctrl, struct request *rq, unsigned int queue_idx) { - struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq); + struct nvme_rdma_request *req = blk_rq_to_pdu(rq); struct nvme_rdma_queue *queue = &ctrl->queues[queue_idx]; struct nvme_rdma_device *dev = queue->device; @@ -330,7 +330,7 @@ static void nvme_rdma_exit_admin_request(struct blk_mq_tag_set *set, static int __nvme_rdma_init_request(struct nvme_rdma_ctrl *ctrl, struct request *rq, unsigned int queue_idx) { - struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq); + struct nvme_rdma_request *req = blk_rq_to_pdu(rq); struct nvme_rdma_queue *queue = &ctrl->queues[queue_idx]; struct nvme_rdma_device *dev = queue->device; struct ib_device *ibdev = dev->dev; @@ -881,7 +881,7 @@ static int nvme_rdma_inv_rkey(struct nvme_rdma_queue *queue, static void nvme_rdma_unmap_data(struct nvme_rdma_queue *queue, struct request *rq) { - struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq); + struct nvme_rdma_request *req = blk_rq_to_pdu(rq); struct nvme_rdma_ctrl *ctrl = queue->ctrl; struct nvme_rdma_device *dev = queue->device; struct ib_device *ibdev = dev->dev; @@ -990,7 +990,7 @@ static int nvme_rdma_map_sg_fr(struct nvme_rdma_queue *queue, static int nvme_rdma_map_data(struct nvme_rdma_queue *queue, struct request *rq, struct nvme_command *c) { - struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq); + struct nvme_rdma_request *req = blk_rq_to_pdu(rq); struct nvme_rdma_device *dev = queue->device; struct ib_device *ibdev = dev->dev; int count, ret; @@ -1179,7 +1179,7 @@ static int nvme_rdma_process_nvme_rsp(struct nvme_rdma_queue *queue, nvme_rdma_error_recovery(queue->ctrl); return ret; } - req = blk_mq_rq_to_pdu(rq); + req = blk_rq_to_pdu(rq); if (rq->tag == tag) ret = 1; @@ -1419,7 +1419,7 @@ static int nvme_rdma_cm_handler(struct rdma_cm_id *cm_id, static enum blk_eh_timer_return nvme_rdma_timeout(struct request *rq, bool reserved) { - struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq); + struct nvme_rdma_request *req = blk_rq_to_pdu(rq); /* queue error recovery */ nvme_rdma_error_recovery(req->queue->ctrl); @@ -1454,7 +1454,7 @@ static int nvme_rdma_queue_rq(struct blk_mq_hw_ctx *hctx, struct nvme_ns *ns = hctx->queue->queuedata; struct nvme_rdma_queue *queue = hctx->driver_data; struct request *rq = bd->rq; - struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq); + struct nvme_rdma_request *req = blk_rq_to_pdu(rq); struct nvme_rdma_qe *sqe = &req->sqe; struct nvme_command *c = sqe->data; bool flush = false; @@ -1526,7 +1526,7 @@ static int nvme_rdma_poll(struct blk_mq_hw_ctx *hctx, unsigned int tag) static void nvme_rdma_complete_rq(struct request *rq) { - struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq); + struct nvme_rdma_request *req = blk_rq_to_pdu(rq); nvme_rdma_unmap_data(req->queue, rq); nvme_complete_rq(rq); diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c index e503cfff0337..fc3794b718e4 100644 --- a/drivers/nvme/target/loop.c +++ b/drivers/nvme/target/loop.c @@ -90,7 +90,7 @@ static inline int nvme_loop_queue_idx(struct nvme_loop_queue *queue) static void nvme_loop_complete_rq(struct request *req) { - struct nvme_loop_iod *iod = blk_mq_rq_to_pdu(req); + struct nvme_loop_iod *iod = blk_rq_to_pdu(req); nvme_cleanup_cmd(req); sg_free_table_chained(&iod->sg_table, true); @@ -148,7 +148,7 @@ static void nvme_loop_execute_work(struct work_struct *work) static enum blk_eh_timer_return nvme_loop_timeout(struct request *rq, bool reserved) { - struct nvme_loop_iod *iod = blk_mq_rq_to_pdu(rq); + struct nvme_loop_iod *iod = blk_rq_to_pdu(rq); /* queue error recovery */ schedule_work(&iod->queue->ctrl->reset_work); @@ -165,7 +165,7 @@ static int nvme_loop_queue_rq(struct blk_mq_hw_ctx *hctx, struct nvme_ns *ns = hctx->queue->queuedata; struct nvme_loop_queue *queue = hctx->driver_data; struct request *req = bd->rq; - struct nvme_loop_iod *iod = blk_mq_rq_to_pdu(req); + struct nvme_loop_iod *iod = blk_rq_to_pdu(req); int ret; ret = nvme_setup_cmd(ns, req, &iod->cmd); @@ -234,7 +234,7 @@ static int nvme_loop_init_request(struct blk_mq_tag_set *set, struct request *req, unsigned int hctx_idx, unsigned int numa_node) { - return nvme_loop_init_iod(set->driver_data, blk_mq_rq_to_pdu(req), + return nvme_loop_init_iod(set->driver_data, blk_rq_to_pdu(req), hctx_idx + 1); } @@ -242,7 +242,7 @@ static int nvme_loop_init_admin_request(struct blk_mq_tag_set *set, struct request *req, unsigned int hctx_idx, unsigned int numa_node) { - return nvme_loop_init_iod(set->driver_data, blk_mq_rq_to_pdu(req), 0); + return nvme_loop_init_iod(set->driver_data, blk_rq_to_pdu(req), 0); } static int nvme_loop_init_hctx(struct blk_mq_hw_ctx *hctx, void *data, diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index b629d8cbf0d1..5a5c18b02a5c 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1136,7 +1136,7 @@ EXPORT_SYMBOL(scsi_init_io); /* Called from inside blk_get_request() */ static void scsi_initialize_rq(struct request *rq) { - struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq); + struct scsi_cmnd *cmd = blk_rq_to_pdu(rq); scsi_req_init(&cmd->req); } @@ -1319,7 +1319,7 @@ scsi_prep_return(struct request_queue *q, struct request *req, int ret) static int scsi_prep_fn(struct request_queue *q, struct request *req) { struct scsi_device *sdev = q->queuedata; - struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(req); + struct scsi_cmnd *cmd = blk_rq_to_pdu(req); int ret; ret = scsi_prep_state_check(sdev, req); @@ -1851,7 +1851,7 @@ static inline int prep_to_mq(int ret) static int scsi_mq_prep_fn(struct request *req) { - struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(req); + struct scsi_cmnd *cmd = blk_rq_to_pdu(req); struct scsi_device *sdev = req->q->queuedata; struct Scsi_Host *shost = sdev->host; unsigned char *sense_buf = cmd->sense_buffer; @@ -1897,7 +1897,7 @@ static int scsi_mq_prep_fn(struct request *req) if (blk_bidi_rq(req)) { struct request *next_rq = req->next_rq; - struct scsi_data_buffer *bidi_sdb = blk_mq_rq_to_pdu(next_rq); + struct scsi_data_buffer *bidi_sdb = blk_rq_to_pdu(next_rq); memset(bidi_sdb, 0, sizeof(struct scsi_data_buffer)); bidi_sdb->table.sgl = @@ -1924,7 +1924,7 @@ static int scsi_queue_rq(struct blk_mq_hw_ctx *hctx, struct request_queue *q = req->q; struct scsi_device *sdev = q->queuedata; struct Scsi_Host *shost = sdev->host; - struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(req); + struct scsi_cmnd *cmd = blk_rq_to_pdu(req); int ret; int reason; @@ -2012,7 +2012,7 @@ static int scsi_init_request(struct blk_mq_tag_set *set, struct request *rq, unsigned int hctx_idx, unsigned int numa_node) { struct Scsi_Host *shost = set->driver_data; - struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq); + struct scsi_cmnd *cmd = blk_rq_to_pdu(rq); cmd->sense_buffer = scsi_alloc_sense_buffer(shost, GFP_KERNEL, numa_node); @@ -2026,7 +2026,7 @@ static void scsi_exit_request(struct blk_mq_tag_set *set, struct request *rq, unsigned int hctx_idx) { struct Scsi_Host *shost = set->driver_data; - struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq); + struct scsi_cmnd *cmd = blk_rq_to_pdu(rq); scsi_free_sense_buffer(shost, cmd->sense_buffer); } @@ -2105,7 +2105,7 @@ EXPORT_SYMBOL_GPL(__scsi_init_queue); static int scsi_init_rq(struct request_queue *q, struct request *rq, gfp_t gfp) { struct Scsi_Host *shost = q->rq_alloc_data; - struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq); + struct scsi_cmnd *cmd = blk_rq_to_pdu(rq); memset(cmd, 0, sizeof(*cmd)); @@ -2131,7 +2131,7 @@ static int scsi_init_rq(struct request_queue *q, struct request *rq, gfp_t gfp) static void scsi_exit_rq(struct request_queue *q, struct request *rq) { struct Scsi_Host *shost = q->rq_alloc_data; - struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq); + struct scsi_cmnd *cmd = blk_rq_to_pdu(rq); if (cmd->prot_sdb) kmem_cache_free(scsi_sdb_cache, cmd->prot_sdb); diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index a4759fd34e7e..df0e5aa2a410 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -265,19 +265,6 @@ int blk_mq_reinit_tagset(struct blk_mq_tag_set *set); int blk_mq_map_queues(struct blk_mq_tag_set *set); void blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, int nr_hw_queues); -/* - * Driver command data is immediately after the request. So subtract request - * size to get back to the original request, add request size to get the PDU. - */ -static inline struct request *blk_mq_rq_from_pdu(void *pdu) -{ - return pdu - sizeof(struct request); -} -static inline void *blk_mq_rq_to_pdu(struct request *rq) -{ - return rq + 1; -} - #define queue_for_each_hw_ctx(q, hctx, i) \ for ((i) = 0; (i) < (q)->nr_hw_queues && \ ({ hctx = (q)->queue_hw_ctx[i]; 1; }); (i)++) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 1e73b4df13a9..912eaff71c09 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -258,6 +258,19 @@ static inline unsigned short req_get_ioprio(struct request *req) return req->ioprio; } +/* + * Driver command data is immediately after the request. So subtract request + * size to get back to the original request, add request size to get the PDU. + */ +static inline struct request *blk_rq_from_pdu(void *pdu) +{ + return pdu - sizeof(struct request); +} +static inline void *blk_rq_to_pdu(struct request *rq) +{ + return rq + 1; +} + #include struct blk_queue_ctx; diff --git a/include/linux/ide.h b/include/linux/ide.h index 6980ca322074..64809a58ee85 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -58,7 +58,7 @@ struct ide_request { static inline struct ide_request *ide_req(struct request *rq) { - return blk_mq_rq_to_pdu(rq); + return blk_rq_to_pdu(rq); } static inline bool ata_misc_request(struct request *rq) diff --git a/include/scsi/scsi_request.h b/include/scsi/scsi_request.h index e0afa445ee4e..be5b62d5347c 100644 --- a/include/scsi/scsi_request.h +++ b/include/scsi/scsi_request.h @@ -18,7 +18,7 @@ struct scsi_request { static inline struct scsi_request *scsi_req(struct request *rq) { - return blk_mq_rq_to_pdu(rq); + return blk_rq_to_pdu(rq); } static inline void scsi_req_free_cmd(struct scsi_request *req)