From patchwork Wed May 24 00:34:07 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: 9744791 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 DC859602A7 for ; Wed, 24 May 2017 00:36:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF90C28865 for ; Wed, 24 May 2017 00:36:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0D6C2885B; Wed, 24 May 2017 00:36:24 +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 9E1E32885B for ; Wed, 24 May 2017 00:36:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968993AbdEXAgV (ORCPT ); Tue, 23 May 2017 20:36:21 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:5764 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968969AbdEXAfr (ORCPT ); Tue, 23 May 2017 20:35:47 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208";a="19885601" Received: from mail-by2nam01lp0178.outbound.protection.outlook.com (HELO NAM01-BY2-obe.outbound.protection.outlook.com) ([216.32.181.178]) by ob1.hgst.iphmx.com with ESMTP; 24 May 2017 08:34: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=eoO1RA9IvZ1nV+6vZs5CQt6n8walHqbvZ05RcLZclKY=; b=Kzyp6dIuQDOG7MV1/cwX27d2x10oPaDdwWD8sEeqUrA+NS5GRkFBI3+/QbZIElwYt6ueavLGQQGUrizN2Wd6Hi4CGFBN95EDkyYU3EH8nuHai7DA9mDQ9Gh6OaSg3LiI9fzms2+dltgyOGn8VuJD1D9ASkeWsjki7dbqfBj7i1g= Received: from CY4PR04CA0032.namprd04.prod.outlook.com (10.172.133.18) by DM5PR04MB0362.namprd04.prod.outlook.com (10.173.169.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Wed, 24 May 2017 00:34:29 +0000 Received: from CO1NAM04FT013.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::208) by CY4PR04CA0032.outlook.office365.com (2603:10b6:903:c6::18) 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; Wed, 24 May 2017 00:34:29 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) 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.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by CO1NAM04FT013.mail.protection.outlook.com (10.152.91.226) 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; Wed, 24 May 2017 00:34:28 +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 B7.55.19026.215D4295; Tue, 23 May 2017 17:34:27 -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; Tue, 23 May 2017 17:34:23 -0700 X-AuditID: 0ac94371-41ba798000004a52-2f-5924d51242a1 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id A6.A3.18148.F05D4295; Tue, 23 May 2017 17:34:23 -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 18/31] block: Make scsi_req_init() calls implicit Date: Tue, 23 May 2017 17:34:07 -0700 Message-ID: <20170524003420.5381-19-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170524003420.5381-1-bart.vanassche@sandisk.com> References: <20170524003420.5381-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrELMWRmVeSWpSXmKPExsXCddJ5ka7wVZVIg1m3WCz+7znGZrHgzV42 i5WrjzJZbOznsNh7S9ui+/oONovlx/8xWRy+d5XFgcNjYvM7do9pk06xeey+2cDm8fHpLRaP 9Vuusnh83iQXwBbFZZOSmpNZllqkb5fAlbGj4ypLwdGqiuYX/xkbGPtTuxg5OSQETCQefX/H 3MXIxSEksJRJYsPKVnYIZwejxPvOGUAOB1jV6gdQRRsZJW6dfMUM0s0mYCTx7f1MFhBbRKBQ 4tK2DkaQImaB94wS194/YwdJCAs4SkzsfsMKYrMIqEpsfriKDcTmFbCXWHdpOgvEGfISZ7fs BBvKCRTvejUBbLGQgJ3Eou0VIDMlBNaxSix7uJEFoldQ4uTMJ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0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(39410400002)(39400400002)(39850400002)(39840400002)(39450400003)(2980300002)(438002)(189002)(199003)(9170700003)(77096006)(36756003)(5660300001)(1076002)(4326008)(5003940100001)(38730400002)(33646002)(53936002)(2906002)(2950100002)(106466001)(54906002)(6666003)(575784001)(8936002)(50226002)(50466002)(47776003)(86362001)(81166006)(72206003)(8676002)(305945005)(478600001)(189998001)(76176999)(50986999)(356003)(48376002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR04MB0362; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT013; 1:rZU9b5kUVXvjRiGauVmmp2XKVX9DJlrnWtob5wDh/ZIATogkGKb3DWkSDf/+sONYWdouZWub4+DIG1eoTEIPh5FYaOe9f848YvQCO0UkUGnAGTXbNcUFfoWDse6nzo1rWS5asgikvmbEnJATC4DHCnMUTKVK2C3hVqZOZwaJu+AGFtV7bCybmdPnpK/WhDWDRfl9prsLEWg6Uwn0lNI5VS9mCLbTn/a5ChxMedHtlgc7UWBiguuRmLyMIOUBGN7hnlPGFs6m+CPyyiiEjT8kbBVYIycsH0Ey/AnA2mIetTnHad9M3IuqWWnzV+HbY9n08xWREINgmIvKD97TbwpXufX6kjL0Ibax3wfPSJPuFu52Eook7aP1hF6qsl6QDani31Kt5xOnzgU9xiN0M/De8E9FkxHp68WZT/07K80OhBWsKByBzZ2uODMyA7SUNSm7hWL6S70pXyt+ns59+aCRrmGasQCgYAmToP9ojZBA8JmnhpSBUP4Zmebkiarm1z/psT0YNeS3RG7XsaynXpcr75HM2BaReVPsBC3+LvH2tR8= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR04MB0362: X-MS-Office365-Filtering-Correlation-Id: 3e5e46d2-5087-4046-f51e-08d4a23ca35c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:DM5PR04MB0362; X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0362; 3:z6zGSmXQcW+zA1WEr5enAMZKlE+fvw3SPm/j4llZgkw/ytsWdAbgwaqKpeShdu+PcRC1FxIJauoMlmBSauXXd1LjIl9HxB2zTRXRqT9HlI9tfL714W/cC6DROE3kEUt9S/es5pxSmB3pNDR49GkkmrEZ99KcfPOEsgwc4tSOvrR2lZhFbx1mrByDZ9rWYdyWmB6FYc1DIX81pRiVtqW0AUzLNda2Zy3sTsSfhuNTOniLcTxOX60Uf8xC1Q9iBerzjiMMlsP+p1SQV622M9J/U/iF+lWuHn16OZRKx4NO6xGC7jZsD9YfdfnAzzqfuWLgDT+s8eTQrD0WcsRSHRSNap/nspeCbYIQArKyKN+vu+1xhwu+2L2OTwmV7NW1+Guw4NaBRUpUwt1SyeUK/TFNiNiCQ1FJ/l/QpDmD2XcGBFBwbi6YRTk/i+JoSiVlEBbsrKcEvJRem0X5LG3NCkiltnMuRdMzo5VdPAAguDPH9bPEtKu0NPEQOMbe7YVGzXwx X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0362; 25:HKbIKuAkuVnu7SBs4K0pYIg4mLm+B3GJrD3YpiNMkMq5D+ecq0voa+p3FHY5arzzZfrrvzr8azlMugx8pRrjnEB4TjCs7YeHGYtxiz2IR2ccjc8pS9YlEJo7Ev0aQ0KyWE2pZtPN7fDKtzDnr6n62VsyGKShJ+22mpWZRXds3ImB8JvbWBtLnnfvB+1kHxgJ369zY7Gj34T/rqtpIsNDVBsP6vxYrdYGob48E2/kVDFZ7+UTEukbUAUyAK9WY7XJ3DwqSSrp1BlcFhqUX8bE2qQE5jKz9pVu77HMS4No9/6CtyJX6w12beKDST84RjI9PRyGr9zxj5BNBvgzO07S+qh/tyr3+lS12XqqHkfEwoQi2FK4NVmzr13HwPMB2F2+709UnfDoskN93y4oqJVopTF76QOReSww5ZBjkuBKnU7Bvm2krlNKrq3OZA66xCcLTsQF5agf91PsIf3NvmJiqwQ2cGj3FRq6sns3wWdSS0M=; 31:d2yq1JjwvVKXWKbDY3tt8vbiMaa/ZwJ1epUOIN3ybto7j1uFKrRKF2ZqSGm5Ye3G8aJTMZaHsrgozdXQ4uHVpVetKgBKrtpIU8ToCdZNPn4YBnMKOG536Bcmjj8PBDcc4qAsnS3DjdPIjuB5weU8p+ABACrI12kIwcO08GkjqnFxcoBqmm0MOQZCDxzjw9Ui+1w4p/ZwhjKzU7JemzEJ6/rQVjeviqs9uibE7UtGATEdDVVKYe1Olo/8/jbxwfsLCh63gzXIZNGIEAnyp8/G8w== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0362; 20:qw/11WyoV92boyjFeMeMeTa51h+7OiJTwloCv5zzTXkPX+9Xn7gv6uArbtnkeERVFdXxvyqhu9+M98NixK7NFDvdDZooWhAd5lT/lEcF4J5a01gN5swDpRjQFjUtGl87v9CUqQMLg8K5gnp+jsOP22otwKkKsAR87ik3ij3AJNR0xGx0ZfL+bawKXrz0fHjZb0Zwzvj7x3ztt/R24PAmZTNtYVj4N8ils++Z8nfL1XOY867b3hoA4lcxr88Q9IQlOBh/vFJOKeDV+mTduNKq2X705n0rd8gGd8WKgg/c4K0o+BPrFkEIPM3JNnEUKOVQZM+dWQMuY+war4Eo+AO65bNXtDEELZ5c4xHmtSX4az7K1UBSe8YA0MPO1iG0l1IgGGCYhrULMXdT3+PT6Taq8xIoA1yn2csGelURHeql30hgnlP9kgiEaJ3i65NKyZd1Ec56s4VAPBJqXFvVSzfETAkEp3cSyYWlzpcTkP/UV0Qc8ObjNP2/1Du+y4OlVxhR 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)(13018025)(5005006)(13016025)(8121501046)(3002001)(93006095)(93004095)(10201501046)(6055026)(6041248)(20161123562025)(20161123560025)(20161123555025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:DM5PR04MB0362; BCL:0; PCL:0; RULEID:; SRVR:DM5PR04MB0362; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR04MB0362; 4:9kjOHb6QN0+UoehPRLGwwQzpJ/u3bynOpaxuerIxEp?= =?us-ascii?Q?uO8ym/uXcqZPH6Ikue0U7yUVNMZUio96G2vL05oHpg/aoWIfLBwZmrRfIVMc?= =?us-ascii?Q?DoWcYurThxzrUEqOqBN2DXi55dHfwAAVdg/MRZ13Qc+X5XUqjG2o4ayQ907O?= =?us-ascii?Q?DekVHik9pYpnFUxfTzHfe/hBY/d8JqoYpbm1KPM5haKOdOZQd1xJGGg/VGwC?= =?us-ascii?Q?w8ac7CBr9knPcPv4cWHaWSl1nYNQ61MSPBh6svqa0s+DEPX4vP8vfQvY6SUH?= =?us-ascii?Q?WA+puKka46oyJOxRwKXR6DBniZdNirpH4VFXsTzeIfnqpyzvAl1pO3X+4T3p?= =?us-ascii?Q?9fPmdUR4CbQsRbuQmD+ZiZDvoUStgY8sdto6ayHnMrAxwqCvI0do1V5enRFe?= =?us-ascii?Q?MEoG3e+tlHeM7nALevOEVfLBFTw/olao0ReQK/E9fjf/UQ5jl1UDhbMswdof?= =?us-ascii?Q?MHmISL6uMOD4YXo3088J1rshmUcDo+9EnQumW3g1l6ZtAauDwBaCP6p1NmrE?= =?us-ascii?Q?8qbR48jAJ669l0xYIMtoI4ng3/Le38x6T5Bx5HTUnyIyMJoNyaRo/2lApqnl?= =?us-ascii?Q?qvPdBmxg7s9gI1QWDKrtFiLEIKklaoswftXLkuwv7HWIAAoODSqsJNWkYUs8?= =?us-ascii?Q?VU6rE0DD84YIovswHJ0dMfDUIJTlpjMODGe1Nf15A9sMG3ohA4u+npyDpfQt?= =?us-ascii?Q?et5Iby604VZB74G17Vi2RiyocqHPDiEx8p8XAxdWH5i5ZMVkqRi9g6ImVNii?= =?us-ascii?Q?y9j92p2UeFf48NXR0/bLb22ydMqvE+Q+Ef9tVahUKgfj9xcvnSoygzVrn8sh?= =?us-ascii?Q?0lAab9cJVjZv1m/vUKSW95O74y8FYqKMjxxTKMTa5h3OCvjHh2FSGXc0qB4o?= =?us-ascii?Q?fOd0g8eSG2h8BoHrLE+Jn957c0rJP7MvxkKTN5FsF9WjPc9KJB3C9bGARvd3?= =?us-ascii?Q?kMoDGTvsX531VJEzg2heeEJlBLZjYjGWHL5TYsR42WU+6y9I2c7MHRKLM7g1?= =?us-ascii?Q?0=3D?= X-Forefront-PRVS: 031763BCAF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR04MB0362; 23:H4nh31X8a/UalXma17zOI+50uz8hXgKpdJ7MCIUUF?= =?us-ascii?Q?xriLDfxzAQu4qGQa3lX2M4wfWB/x7d2dI3zD0LsgyNQb3QxHaG50GDBvRq62?= =?us-ascii?Q?W1gWWVba3R7KW5yVFpUJPn04xtT77nXr8JiwbFFyJy8hkNSqQ9dOouUji56d?= =?us-ascii?Q?484Y0+MwYsF9aVnMGWRaqNrkcnVY+QaxE9dXJybDoCtYrYyC3vVFEa2/pCkH?= =?us-ascii?Q?NgtaOvC1IfrytUWONL9QF7qB2cO84WYI8v2tDX7Rayci85JeIPwJ43ixh1RI?= =?us-ascii?Q?fsFS16bJDchzas/dtTUXvNbc9KyuHNQPDp88nqXOSAms5dtWDhMKb2ob/iko?= =?us-ascii?Q?E9TxBbgNNbbzUp+e1mpWoZPAX+8H4I7j/JB9xVnDvzBh2IpP4086IY8fZxWq?= =?us-ascii?Q?cSHLruC35A7Y7Zwl5+b7ZBpfLREVlRTx9lsVM+KPd0G8tvSo5a+DQMPMIj2o?= =?us-ascii?Q?1QXmiLdkFX6n6bMq3eZKccAQ0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xEk/p704Rw6fV4JEw8j1En6YVkME6FbCvZWnoC1boV7bN6YMvms= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2017 00:34:28.3441 (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.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR04MB0362 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 f7695bb141d9..3ca080be4c70 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 b8ce55d7911d..08e3e2fb649b 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 070568d496dc..e643c9d7beec 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -2199,7 +2199,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 fdfa11f80dda..6b979f27584c 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); queue_flag_set_unlocked(QUEUE_FLAG_SCSI_SUP, q); if (blk_init_allocated_queue(q) < 0) { 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 bbcc269f0ec1..e2e614e990a8 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 4cecf82960b7..01ddf05e741e 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -249,7 +249,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)) @@ -1133,6 +1132,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; @@ -2091,6 +2097,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 e5eab2685ecf..2512242812d6 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 9ca0ca5efbc8..f185fd979448 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)