From patchwork Fri May 19 18:30:06 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: 9737945 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 E62806041F for ; Fri, 19 May 2017 18:32:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE28E26256 for ; Fri, 19 May 2017 18:32:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2E7626E4E; Fri, 19 May 2017 18:32:37 +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=unavailable 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 CC17B26256 for ; Fri, 19 May 2017 18:32:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756287AbdESScO (ORCPT ); Fri, 19 May 2017 14:32:14 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:25646 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756042AbdESSa1 (ORCPT ); Fri, 19 May 2017 14:30:27 -0400 X-IronPort-AV: E=Sophos;i="5.38,365,1491235200"; d="scan'208";a="115828404" Received: from mail-sn1nam02lp0019.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) ([216.32.180.19]) by ob1.hgst.iphmx.com with ESMTP; 20 May 2017 02:46:40 +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=czIDYQqPaVALyfppeRUDzwRHNkE/pTGaWk5woELB1DQ=; b=nTTm9YMbOIoVgyzphsXlat1YS/ap7kE4YrYRZibx1O6DicANPogPdWJVHLrBRFFTBhpU0x6V2wPqL4UWuelzqvV+IbsX36QuzYR0aqWXlvJ/2M46sroUdnWMmgLmNjN3dCk4WsxkxmASg0wkhZt+dwAXm64c+O9jAGZE5VzTf64= Received: from BN3PR0401CA0036.namprd04.prod.outlook.com (10.162.159.174) by CY4PR04MB0502.namprd04.prod.outlook.com (10.173.190.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.16; Fri, 19 May 2017 18:30:24 +0000 Received: from BN3NAM04FT057.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::208) by BN3PR0401CA0036.outlook.office365.com (2a01:111:e400:51d1::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14 via Frontend Transport; Fri, 19 May 2017 18:30:24 +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 BN3NAM04FT057.mail.protection.outlook.com (10.152.93.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1075.5 via Frontend Transport; Fri, 19 May 2017 18:30:23 +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 C9.5A.29323.EB93F195; Fri, 19 May 2017 11:30:22 -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; Fri, 19 May 2017 11:30:19 -0700 X-AuditID: 0ac94369-548749800000728b-a4-591f39bed053 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id AC.37.18148.AB93F195; Fri, 19 May 2017 11:30:18 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , James Bottomley CC: , Bart Van Assche , Jens Axboe , Christoph Hellwig , Omar Sandoval , Hannes Reinecke , Subject: [PATCH 08/18] block: Make scsi_req_init() calls implicit Date: Fri, 19 May 2017 11:30:06 -0700 Message-ID: <20170519183016.12646-9-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170519183016.12646-1-bart.vanassche@sandisk.com> References: <20170519183016.12646-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrELMWRmVeSWpSXmKPExsXCddJ5ke4+S/lIg4undC3+7znGZrHgzV42 i5WrjzJZbOznsNh7S9ui+/oONovlx/8xWRy+d5XFgcNjYvM7do9pk06xeey+2cDm8fHpLRaP 9Vuusnh83iQXwBbFZZOSmpNZllqkb5fAlXF7wgn2gtVVFVt2vGZpYPya0sXIySEhYCLxaN51 5i5GLg4hgaVMEl1t01khnB2MEr8PdzDBVE162MsIkdjMKHH75nRmkASbgJHEt/czWUBsEYFC iUvbOsCKmAXeM0pcvrAIyOHgEBZwlHi1xg2khkVAVeLgqXZWEJtXwF7ix+9jzBAL5CXObtkJ ZnMKOEi8PL6QHaRVCKjmfl89yEgJgXWsEj+fbmSC6BWUODnzCdheZgEJiYMvXoD1Cgmo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365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39850400002)(39400400002)(39860400002)(39840400002)(39450400003)(2980300002)(438002)(199003)(189002)(9170700003)(4326008)(5003940100001)(478600001)(48376002)(50466002)(47776003)(36756003)(2906002)(189998001)(76176999)(50226002)(77096006)(356003)(1076002)(54906002)(86362001)(33646002)(305945005)(2950100002)(72206003)(53936002)(575784001)(38730400002)(50986999)(81166006)(5660300001)(8936002)(106466001)(6666003)(8676002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR04MB0502; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT057; 1:N4oXxyvjuqk4fxjLhT9evnykuuYscc1QJcRQaTCkaup1TUw3tn72EWULZsm0wX8OGsG4e4DoQRCdQv0jsCQJZYBP85zgOFsCaKBghjxX9TG7eWsVAQlr3G5LZeeNvwWfKGh+utArjNmtMeWsqEn/fzZ98o0VkvQnBovi+h2T0kFuRhObfksqpmsQ903CPpU3c+A5BkQzqx9n07iDon+2pr1KkqVfrOVdq+zycQg89XyFPGM6E0wJaOjYeNT+Q1mx4XuAraPRGGIqHUAdGhC+vqjDBB2/K0b4Fu4lCkSoX2Wtwn9nuKt0vRlUlYpJfmULeXqLAXqKAdSuaIVyCLxISPSORCj6kgUCC2n8fXW9DMM8dms4KJ9BPDTV4twt2Zzvf16zjWP2UKFlt9prMACr43p8ewJnbzQXmPZGxGVCEz7hcbyHHx3J6iuNet/ib03VhHFPV+2mEqNOoGO5oiUSwd+MhkbnGDmcnOmsb+f90HGZv9SmkXmdNI7ASFaT1jLZcso/6fHDM3+j0MPmB1yQiTe5uV+ssyo/Hnamz56ttsY= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 453a5915-843f-4645-c755-08d49ee51d13 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:CY4PR04MB0502; X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0502; 3:pAfURXNu9ACNZ8egPo3tO4QpGXX4DhUG72Zip1f282pmOtxCEkmgJpd6mx5LKVQJvXTY5rptwdmBuAwcU/v5AW0DgcK0r1t0c2lGpHtFeDgfM3Jrrw+Bwg/mxT5pkh5dJ6kg6LwiEHaiYTL8Of6ATWqu4xoKagcTGwKYBEV9jeYvghyGCG89hL1KTzV0o8a4YVXaU4bkck+x0dgWpsWqFyXGan1quaLKdfqKZrpHP6vtYgxrKcOQosYkbGBh2jmGgE7eRUSRifUiAB00ip0IJEnOoJBfktJK/XEekGzWbw5/hpj/188/oiVz4ychkjbXkocv9C+wUWszzgatg7zDYbKe5xNpLWNpFcfOnBLUpG2ETizHLWIhDVEyAA45mYR9oWDsBMUjBFNjUuW/uA1rYjMcyjXJqr12csFisfv2r9eSXTkgfzWM8iVIebbYv0j8dwGE7BcA8jfApXhR+UEeUhPb5ke3oTroe6KRoPsVmpu0FbekG+9SKOdewOlB5djz X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0502; 25:YDvrqkEfyq0PFGyeDKtloVbMYHlEwmrOJ/lcVh+fbSK9Rb3Ho5GdRyu4Qdl3OjkEuEMQgoullpwiAOEfBIawtRBOqoZ9wKz9+DO35etQuPW77xl2MfN60ID6NEP17QgLNohmSeW8K4Sc/4SnvPcO+Ll/pA3uT+MHz0JBdAobiAVZ7hSJG1j+jVJEer07c3vwTd3SIpFjMBEtZlz3w32e7HynwQNZmTOvalIpUOTFrPxPLsWN0s9YK5aoXe+G7KUqkBdldnmMkOFj3KUdoJHZGq2bJyERVPcPG88Sjc4ZRcdFE9ttJw9YvbsObtAnltRiwLKvBRSb+lcqXRG8imeSEAgUb5F9Dpe89GpWi9zvrYEtV8tlGPXvhOn7Z6CsgXxboBm75Cyyesclvjj75ktJeZcsfaRbG2hNSQHg3gVoxULgqcGZporcToNQJhU7OPcZRG//QBiEpCLHW+4Lz7KIJxqcFJJPfLinMKCl4QYXbSU=; 31:X42ZEVeeXk9rr/a+jCSMY/7SGd4AmDMl5COB9vUJVFkwedc5k4OKNLekNwrf5O07OeE8BeK6/0XXJzU2+rhmkz5OvDWfytCbMBiXHAXU0u0O+o4cgk7KmQhz1zl/gZCM2BIwQ4xNhiagY3Gq8rWlDZSyn++7PVwUPwHDsvAKo9QTXx0Nn+W0Q2s2Jb5/647uxghtfPHn5bUWihX5w3Q0Plw3eHyE6wNWPM8cUzSJ+GR4itHk2BGwldScx+U3gx7ft49ULJgGNihcnpAlwMfoBg== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0502; 20:GcI2OpJxLeDLZfodPqf1KsbfQIc3fFNJUTlmIoPtU0Sl88fLXyYABEIuk5XGdCj3XCh91eiAozo8iy0juA6gwhr9ujuWmFe6FKroBoP1o8AxKfPpyLyl97Gbq98saIIz8W0SqF/lgKHg1WVqBM3vKhTVkRNV6NR2xtirhc7ozI+51h9QzR7ztZiSSlNNKcdHm21uYJtC3nunsF9SDPimVFAK3OLGS0Gp0KjIBbWeFciZWzXKBCVYTQoeCmqbYusEUrtTxPgLNJqEkbFmePJ4jLXQikpaAe+uHb9x/6XVxBuX3NSMdI4/XhcskzIwpqvk95vXWjO/3QkApY9cpu1OvgJv0VnVFpHpEwvihfA2CegjXfj46npnhMbx12oOB2I0srDYztuoiucnUaEEhgK2LnJk42XJ/zPpIdww6NQj+NVIVVKLdmB1hOVx/Pni2HXI376pf726F66y5sEp3+uDrCtLI0LQPTKJIoKsTD9iulfc8gjRJ9lIzlexYqC6QO2S X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(67672495146484)(42932892334569)(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13016025)(8121501046)(5005006)(13018025)(10201501046)(3002001)(93006095)(93004095)(6055026)(6041248)(20161123558100)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(6072148); SRVR:CY4PR04MB0502; BCL:0; PCL:0; RULEID:; SRVR:CY4PR04MB0502; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR04MB0502; 4:HzSzcX36XqQh6j653AwnoKr3vx53dYb1itD0Wn1WC+?= =?us-ascii?Q?vaLcIEpfBbe2yZR51mouvxh4hs1YVs2lawWeMaojfsUidi/whfVqO+hMEd9W?= =?us-ascii?Q?Gs5idWRnbl4uYA0mZhIOPnjN3uzTJsUmcdQ/xzzCqW4wAt3jVjU8mVpyW8Ur?= =?us-ascii?Q?app/n900q1cmObSEaynv8cWi6WrPzwibOFuqa3Icy1eV/kVNyO7KRMco0Msx?= =?us-ascii?Q?zdEJkspsoRwk8qD0iqAM9ZZXk77op6OVjU8u/EwlsDP0euKxuMUxvONSS5hy?= =?us-ascii?Q?3IPhnKMGH8JMe0GDkmcFwnlUMqDoDen24S1q190gUt3FiZS/l7Ell7Muwc1P?= =?us-ascii?Q?WGPt2W3hXsm8K78uGR9WOS1k2j3ZUFuDOiWp0yb2zey+FEWN1a6YwuBYTvcS?= =?us-ascii?Q?DDNQ70m0m3ZaOkbwzwki/iABSty+5KPrp7CH6+JTmi/8oInIeqbX3CkOrDFu?= =?us-ascii?Q?5D/ADimBdz+MIxtnPD7WaIeH6B70a9Ugl8IK8cgGsPhtI0PZajd87CJYdsNg?= =?us-ascii?Q?/wZUppYSk5oS6hgrPsPaGniYo0VbPK37/gCKlUwj0usnxFCRWEyR58PTT2ki?= =?us-ascii?Q?Qkqv8TJVBDlDmTPzcoK6wuWkWIo0/AG4EI659g1M0LeKhUlsblEoCGW64NFt?= =?us-ascii?Q?g8T27CId87lgaLlvjdrIvrTMd/gvotP07ZAZMC2g+gqZXaFBJc5aIaUItYp7?= =?us-ascii?Q?JKN8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3U0g= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2017 18:30:23.0648 (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: CY4PR04MB0502 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 Instead of explicitly calling scsi_req_init(), let blk_get_request() call that function from inside blk_rq_init(). Add an .initialize_rq_fn() callback function to the block drivers that need it. Merge the IDE .init_rq_fn() function into .initialize_rq_fn() because it is too small to keep it as a separate function. References: commit 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Bart Van Assche Cc: Jens Axboe Cc: Christoph Hellwig Cc: Omar Sandoval Cc: Hannes Reinecke Cc: linux-block@vger.kernel.org --- block/bsg.c | 1 - block/scsi_ioctl.c | 3 --- drivers/block/pktcdvd.c | 1 - drivers/cdrom/cdrom.c | 1 - drivers/ide/ide-atapi.c | 2 -- drivers/ide/ide-cd.c | 1 - drivers/ide/ide-cd_ioctl.c | 1 - drivers/ide/ide-devsets.c | 1 - drivers/ide/ide-disk.c | 1 - drivers/ide/ide-ioctls.c | 2 -- drivers/ide/ide-park.c | 2 -- drivers/ide/ide-pm.c | 2 -- drivers/ide/ide-probe.c | 6 +++--- drivers/ide/ide-tape.c | 1 - drivers/ide/ide-taskfile.c | 1 - drivers/scsi/osd/osd_initiator.c | 2 -- drivers/scsi/osst.c | 1 - drivers/scsi/scsi_error.c | 1 - drivers/scsi/scsi_lib.c | 10 +++++++++- drivers/scsi/scsi_transport_sas.c | 6 ++++++ drivers/scsi/sg.c | 2 -- drivers/scsi/st.c | 1 - drivers/target/target_core_pscsi.c | 2 -- fs/nfsd/blocklayout.c | 1 - 24 files changed, 18 insertions(+), 34 deletions(-) diff --git a/block/bsg.c b/block/bsg.c index 5ccecc9855ac..0fe9b584fde0 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -236,7 +236,6 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm) rq = blk_get_request(q, op, GFP_KERNEL); if (IS_ERR(rq)) return rq; - scsi_req_init(rq); ret = blk_fill_sgv4_hdr_rq(q, rq, hdr, bd, has_write_perm); if (ret) diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 4a294a5f7fab..f96c51f5df40 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -326,7 +326,6 @@ static int sg_io(struct request_queue *q, struct gendisk *bd_disk, if (IS_ERR(rq)) return PTR_ERR(rq); req = scsi_req(rq); - scsi_req_init(rq); if (hdr->cmd_len > BLK_MAX_CDB) { req->cmd = kzalloc(hdr->cmd_len, GFP_KERNEL); @@ -456,7 +455,6 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, goto error_free_buffer; } req = scsi_req(rq); - scsi_req_init(rq); cmdlen = COMMAND_SIZE(opcode); @@ -542,7 +540,6 @@ static int __blk_send_generic(struct request_queue *q, struct gendisk *bd_disk, rq = blk_get_request(q, REQ_OP_SCSI_OUT, __GFP_RECLAIM); if (IS_ERR(rq)) return PTR_ERR(rq); - scsi_req_init(rq); rq->timeout = BLK_DEFAULT_SG_TIMEOUT; scsi_req(rq)->cmd[0] = cmd; scsi_req(rq)->cmd[4] = data; diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 4134bb54f6ad..12dc1f334420 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -707,7 +707,6 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command * REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, __GFP_RECLAIM); if (IS_ERR(rq)) return PTR_ERR(rq); - scsi_req_init(rq); if (cgc->buflen) { ret = blk_rq_map_kern(q, rq, cgc->buffer, cgc->buflen, diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index dc20e4368136..547157b8fa1f 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -2200,7 +2200,6 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf, break; } req = scsi_req(rq); - scsi_req_init(rq); ret = blk_rq_map_user(q, rq, NULL, ubuf, len, GFP_KERNEL); if (ret) { diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index 5901937284e7..7edebe0fb1eb 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c @@ -93,7 +93,6 @@ int ide_queue_pc_tail(ide_drive_t *drive, struct gendisk *disk, int error; rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); - scsi_req_init(rq); ide_req(rq)->type = ATA_PRIV_MISC; rq->special = (char *)pc; @@ -200,7 +199,6 @@ void ide_prep_sense(ide_drive_t *drive, struct request *rq) memset(sense, 0, sizeof(*sense)); blk_rq_init(rq->q, sense_rq); - scsi_req_init(sense_rq); err = blk_rq_map_kern(drive->queue, sense_rq, sense, sense_len, GFP_NOIO); diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 07e5ff3a64c3..a14ccb34c923 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -438,7 +438,6 @@ int ide_cd_queue_pc(ide_drive_t *drive, const unsigned char *cmd, rq = blk_get_request(drive->queue, write ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN, __GFP_RECLAIM); - scsi_req_init(rq); memcpy(scsi_req(rq)->cmd, cmd, BLK_MAX_CDB); ide_req(rq)->type = ATA_PRIV_PC; rq->rq_flags |= rq_flags; diff --git a/drivers/ide/ide-cd_ioctl.c b/drivers/ide/ide-cd_ioctl.c index 55cd736c39c6..9d26c9737e21 100644 --- a/drivers/ide/ide-cd_ioctl.c +++ b/drivers/ide/ide-cd_ioctl.c @@ -304,7 +304,6 @@ int ide_cdrom_reset(struct cdrom_device_info *cdi) int ret; rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); - scsi_req_init(rq); ide_req(rq)->type = ATA_PRIV_MISC; rq->rq_flags = RQF_QUIET; blk_execute_rq(drive->queue, cd->disk, rq, 0); diff --git a/drivers/ide/ide-devsets.c b/drivers/ide/ide-devsets.c index 9b69c32ee560..ef7c8c43a380 100644 --- a/drivers/ide/ide-devsets.c +++ b/drivers/ide/ide-devsets.c @@ -166,7 +166,6 @@ int ide_devset_execute(ide_drive_t *drive, const struct ide_devset *setting, return setting->set(drive, arg); rq = blk_get_request(q, REQ_OP_DRV_IN, __GFP_RECLAIM); - scsi_req_init(rq); ide_req(rq)->type = ATA_PRIV_MISC; scsi_req(rq)->cmd_len = 5; scsi_req(rq)->cmd[0] = REQ_DEVSET_EXEC; diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 7c06237f3479..241983da5fc4 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -478,7 +478,6 @@ static int set_multcount(ide_drive_t *drive, int arg) return -EBUSY; rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); - scsi_req_init(rq); ide_req(rq)->type = ATA_PRIV_TASKFILE; drive->mult_req = arg; diff --git a/drivers/ide/ide-ioctls.c b/drivers/ide/ide-ioctls.c index 8c0d17297a7a..3661abb16a5f 100644 --- a/drivers/ide/ide-ioctls.c +++ b/drivers/ide/ide-ioctls.c @@ -126,7 +126,6 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg) struct request *rq; rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); - scsi_req_init(rq); ide_req(rq)->type = ATA_PRIV_TASKFILE; blk_execute_rq(drive->queue, NULL, rq, 0); err = scsi_req(rq)->result ? -EIO : 0; @@ -224,7 +223,6 @@ static int generic_drive_reset(ide_drive_t *drive) int ret = 0; rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); - scsi_req_init(rq); ide_req(rq)->type = ATA_PRIV_MISC; scsi_req(rq)->cmd_len = 1; scsi_req(rq)->cmd[0] = REQ_DRIVE_RESET; diff --git a/drivers/ide/ide-park.c b/drivers/ide/ide-park.c index 94e3107f59b9..1f264d5d3f3f 100644 --- a/drivers/ide/ide-park.c +++ b/drivers/ide/ide-park.c @@ -32,7 +32,6 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout) spin_unlock_irq(&hwif->lock); rq = blk_get_request(q, REQ_OP_DRV_IN, __GFP_RECLAIM); - scsi_req_init(rq); scsi_req(rq)->cmd[0] = REQ_PARK_HEADS; scsi_req(rq)->cmd_len = 1; ide_req(rq)->type = ATA_PRIV_MISC; @@ -48,7 +47,6 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout) * timeout has expired, so power management will be reenabled. */ rq = blk_get_request(q, REQ_OP_DRV_IN, GFP_NOWAIT); - scsi_req_init(rq); if (IS_ERR(rq)) goto out; diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c index 0977fc1f40ce..cfe3c2d7db7f 100644 --- a/drivers/ide/ide-pm.c +++ b/drivers/ide/ide-pm.c @@ -19,7 +19,6 @@ int generic_ide_suspend(struct device *dev, pm_message_t mesg) memset(&rqpm, 0, sizeof(rqpm)); rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); - scsi_req_init(rq); ide_req(rq)->type = ATA_PRIV_PM_SUSPEND; rq->special = &rqpm; rqpm.pm_step = IDE_PM_START_SUSPEND; @@ -91,7 +90,6 @@ int generic_ide_resume(struct device *dev) memset(&rqpm, 0, sizeof(rqpm)); rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); - scsi_req_init(rq); ide_req(rq)->type = ATA_PRIV_PM_RESUME; rq->rq_flags |= RQF_PREEMPT; rq->special = &rqpm; diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 023562565d11..824eae707d25 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -741,12 +741,12 @@ static void ide_port_tune_devices(ide_hwif_t *hwif) } } -static int ide_init_rq(struct request_queue *q, struct request *rq, gfp_t gfp) +static void ide_initialize_rq(struct request *rq) { struct ide_request *req = blk_mq_rq_to_pdu(rq); + scsi_req_init(rq); req->sreq.sense = req->sense; - return 0; } /* @@ -771,7 +771,7 @@ static int ide_init_queue(ide_drive_t *drive) return 1; q->request_fn = do_ide_request; - q->init_rq_fn = ide_init_rq; + q->initialize_rq_fn = ide_initialize_rq; q->cmd_size = sizeof(struct ide_request); if (blk_init_allocated_queue(q) < 0) { blk_cleanup_queue(q); diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index a0651f948b76..370fd39dce94 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -855,7 +855,6 @@ static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int size) BUG_ON(size < 0 || size % tape->blk_size); rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, __GFP_RECLAIM); - scsi_req_init(rq); ide_req(rq)->type = ATA_PRIV_MISC; scsi_req(rq)->cmd[13] = cmd; rq->rq_disk = tape->disk; diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index d71199d23c9e..d915a8eba557 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c @@ -433,7 +433,6 @@ int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf, rq = blk_get_request(drive->queue, (cmd->tf_flags & IDE_TFLAG_WRITE) ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN, __GFP_RECLAIM); - scsi_req_init(rq); ide_req(rq)->type = ATA_PRIV_TASKFILE; /* diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index 8a1b94816419..d974e7f1d2f1 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c @@ -1572,7 +1572,6 @@ static struct request *_make_request(struct request_queue *q, bool has_write, flags); if (IS_ERR(req)) return req; - scsi_req_init(req); for_each_bio(bio) { struct bio *bounce_bio = bio; @@ -1617,7 +1616,6 @@ static int _init_blk_request(struct osd_request *or, ret = PTR_ERR(req); goto out; } - scsi_req_init(req); or->in.req = or->request->next_rq = req; } } else if (has_in) diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 67cbed92f07d..22080148c6a8 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c @@ -373,7 +373,6 @@ static int osst_execute(struct osst_request *SRpnt, const unsigned char *cmd, return DRIVER_ERROR << 24; rq = scsi_req(req); - scsi_req_init(req); req->rq_flags |= RQF_QUIET; SRpnt->bio = NULL; diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 23d6f225c671..fbbdc345be85 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1915,7 +1915,6 @@ static void scsi_eh_lock_door(struct scsi_device *sdev) if (IS_ERR(req)) return; rq = scsi_req(req); - scsi_req_init(req); rq->cmd[0] = ALLOW_MEDIUM_REMOVAL; rq->cmd[1] = 0; diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 22bc8701ba19..a294a010d585 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -250,7 +250,6 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, if (IS_ERR(req)) return ret; rq = scsi_req(req); - scsi_req_init(req); if (bufflen && blk_rq_map_kern(sdev->request_queue, req, buffer, bufflen, __GFP_RECLAIM)) @@ -1134,6 +1133,13 @@ int scsi_init_io(struct scsi_cmnd *cmd) } EXPORT_SYMBOL(scsi_init_io); +/* Called from inside blk_get_request() */ +static void scsi_initialize_rq(struct request *rq) +{ + scsi_req_init(rq); +} + +/* Called after a request has been started. */ void scsi_init_command(struct scsi_device *dev, struct scsi_cmnd *cmd) { void *buf = cmd->sense_buffer; @@ -2087,6 +2093,8 @@ void __scsi_init_queue(struct Scsi_Host *shost, struct request_queue *q) * blk_queue_update_dma_alignment() later. */ blk_queue_dma_alignment(q, 0x03); + + q->initialize_rq_fn = scsi_initialize_rq; } EXPORT_SYMBOL_GPL(__scsi_init_queue); diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 0ebe2f1bb908..6de65e73201d 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c @@ -213,6 +213,11 @@ static void sas_host_release(struct device *dev) blk_cleanup_queue(q); } +static void sas_initialize_rq(struct request *rq) +{ + scsi_req_init(rq); +} + static int sas_bsg_initialize(struct Scsi_Host *shost, struct sas_rphy *rphy) { struct request_queue *q; @@ -230,6 +235,7 @@ static int sas_bsg_initialize(struct Scsi_Host *shost, struct sas_rphy *rphy) q = blk_alloc_queue(GFP_KERNEL); if (!q) return -ENOMEM; + q->initialize_rq_fn = sas_initialize_rq; q->cmd_size = sizeof(struct scsi_request); if (rphy) { diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 0a38ba01b7b4..071a7fe27c11 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -1732,8 +1732,6 @@ sg_start_req(Sg_request *srp, unsigned char *cmd) } req = scsi_req(rq); - scsi_req_init(rq); - if (hp->cmd_len > BLK_MAX_CDB) req->cmd = long_cmdp; memcpy(req->cmd, cmd, hp->cmd_len); diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 1ea34d6f5437..dc4d2b9e15a0 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -549,7 +549,6 @@ static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd, if (IS_ERR(req)) return DRIVER_ERROR << 24; rq = scsi_req(req); - scsi_req_init(req); req->rq_flags |= RQF_QUIET; mdata->null_mapped = 1; diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index a93d94e68ab5..4df4fd5783c3 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -992,8 +992,6 @@ pscsi_execute_cmd(struct se_cmd *cmd) goto fail; } - scsi_req_init(req); - if (sgl) { ret = pscsi_map_sg(cmd, sgl, sgl_nents, req); if (ret) diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c index 90d1df31491b..d5a1f6c015c9 100644 --- a/fs/nfsd/blocklayout.c +++ b/fs/nfsd/blocklayout.c @@ -232,7 +232,6 @@ static int nfsd4_scsi_identify_device(struct block_device *bdev, goto out_free_buf; } req = scsi_req(rq); - scsi_req_init(rq); error = blk_rq_map_kern(q, rq, buf, bufflen, GFP_KERNEL); if (error)