From patchwork Thu May 25 18:43:17 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: 9748937 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 BA30360209 for ; Thu, 25 May 2017 18:44:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B00FD2836D for ; Thu, 25 May 2017 18:44:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4B472836F; Thu, 25 May 2017 18:44:05 +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 8098F269DA for ; Thu, 25 May 2017 18:44:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031314AbdEYSoD (ORCPT ); Thu, 25 May 2017 14:44:03 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:13770 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1036478AbdEYSnp (ORCPT ); Thu, 25 May 2017 14:43:45 -0400 X-IronPort-AV: E=Sophos;i="5.38,393,1491235200"; d="scan'208";a="20374633" Received: from mail-sn1nam01lp0112.outbound.protection.outlook.com (HELO NAM01-SN1-obe.outbound.protection.outlook.com) ([207.46.163.112]) by ob1.hgst.iphmx.com with ESMTP; 26 May 2017 02:43:35 +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=/Fab1YxjLSR04+URgVQhI3Lc5Dolqk0lUHtMq5U12ZQ=; b=ViQl0hAQ9SuoMzScSYkB+LsSgj3+eHGB047wiWexv6ku6rd4qFbnErYwKjme3oopKnmdpLwIK9G3sHZcTfQM+RQuAmd8jveRiJ1HfAHBOSGdFhtF0WFbQQ94BVtibxYph/AWzzROuGfAyGa2SVdKJKZQFuGv7kpEWVQUyGrOq0I= Received: from MWHPR04CA0072.namprd04.prod.outlook.com (10.173.46.34) 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; Thu, 25 May 2017 18:43:33 +0000 Received: from CO1NAM04FT044.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::205) by MWHPR04CA0072.outlook.office365.com (2603:10b6:300:6c::34) 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; Thu, 25 May 2017 18:43:32 +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 CO1NAM04FT044.mail.protection.outlook.com (10.152.91.95) 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; Thu, 25 May 2017 18:43:32 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 36.BC.45291.3D527295; Thu, 25 May 2017 11:43:31 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Thu, 25 May 2017 11:43:27 -0700 X-AuditID: 0ac94369-166ac9800001b0eb-14-592725d315a2 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 3C.E8.11415.FC527295; Thu, 25 May 2017 11:43:27 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Christoph Hellwig , "Bart Van Assche" , Jens Axboe , Omar Sandoval Subject: [PATCH 09/19] block: Make scsi_req_init() calls implicit Date: Thu, 25 May 2017 11:43:17 -0700 Message-ID: <20170525184327.23570-10-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170525184327.23570-1-bart.vanassche@sandisk.com> References: <20170525184327.23570-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJLMWRmVeSWpSXmKPExsXCddJ5ke5lVfVIg3dfZS3+7znGZrH6bj+b xcrVR5ks9t7Stjh87yqLA6vHxOZ37B6Xz5Z67L7ZwObxeZNcAEsUl01Kak5mWWqRvl0CV8b2 Fz2MBeeqKtbMe8XUwDgjtYuRg0NCwERi0+nALkYuDiGBpUwS399PZYdwdjBKfNz8HsjhBCta O3EXM0RiM6PEkraHLCAJNgEjiW/vZ4LZIgIKEj2/V7KBFDELrGOUOL/3NBNIQljAUaLr41uw SSwCqhI3zl9nBrF5BRwkli48zQqxQV7i7JadYHFOoPiXqRfZQM4TErCXOHHDEWSmhEAfq8Sx +/vYIXoFJU7OfAK2mFlAQuLgixdgvUIC6hInl8xnmsAoNAtJ2SwkZQsYmVYxiuVm5hTnpqcW GJrqFSfmpWQWZ+sl5+duYoQEeOYOxrtPvA8xCnAwKvHwcjxUixRiTSwrrsw9xCjBwawkwqus qB4pxJuSWFmVWpQfX1Sak1p8iFGag0VJnPeczNQIIYH0xJLU7NTUgtQimCwTB6dUA6P30cO7 N/zL/a9xuvSAyNEcGyNup0VlkX4xzxefDO9iNE2bNvOOtuuMOabZy3et/mv+vIL96uWGlOjz rrpKBbySS/Zr9atyrVT1nrZgl8aL9du+nNo264JHxacD19J8LeQfz/uULf9PNaVwg7fynFjl zebJlfsF11yo9zpYtXKjsl+z70OGyyuVWIozEg21mIuKEwHXdRPIbAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrBJMWRmVeSWpSXmKPExsXCtZEjRfe8qnqkwdT5Fhb/9xxjs1h9t5/N 4uDPNkaLlauPMlnsvaVtcfjeVRYHNo+Jze/YPS6fLfXYfbOBzWPamvNMHp83yQWwRnHZpKTm ZJalFunbJXBlbH/Rw1hwrqpizbxXTA2MM1K7GDk5JARMJNZO3MUMYgsJbGSUWHNJFsRmEzCS +PZ+JguILSKgINHzeyVbFyMXB7PABkaJDUuXsoIkhAUcJbo+vmUHsVkEVCVunL8ONohXwEHi z44njBAL5CXObtkJFucEin+ZehFoEAfQMnuJEzccJzByL2BkWMUolpuZU5ybnllgaKhXnJiX klmcrZecn7uJERwWnJE7GJ9OND/EyMTBKdXAyLNh2rYZH59OT5mU07JAPPPD1vxjOmfFfkqL L93xsk+qvp7ldLnKZvGLgjK/JSPknp1te7Ok2bRCdttLeUFGw10dr3zMFod7es1Qbz+nK/8r /JA0R3rS7n9pJy5tXsyxie/Dyzt2Kt/bF1bMmPhe2aZ1c+Obv3wslrvOfZL51nzQ49y7BbEr biuxFGckGmoxFxUnAgDao38juwEAAA== MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39850400002)(39860400002)(39410400002)(39450400003)(39840400002)(39400400002)(2980300002)(438002)(189002)(199003)(9170700003)(305945005)(6666003)(110136004)(2906002)(1076002)(86362001)(575784001)(5003940100001)(72206003)(189998001)(2950100002)(36756003)(478600001)(76176999)(50986999)(33646002)(6916009)(356003)(106466001)(47776003)(50226002)(48376002)(38730400002)(50466002)(4326008)(53936002)(54906002)(8936002)(8676002)(77096006)(81166006)(5660300001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR04MB0362; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT044; 1:0T0C1RidcPO0pKab+Xz1klYlcOMNEsSJvxgYbLUYsorFbgHsbrn0PdGp8c0lpKgdivf/huyVCh7Idd6YcweIii8Vo0Rh6wqH8agFcvdPHMA+GlXdjbRQ8WNaW/xqcTTG6Yjsh0Z98IkmHFe7VfNaNoz/GDWRJa8HHOskzyxaituOmzNJ//74BLsqxx0Es0yrKIXt0czr/jipKFCiEdi/p00IBr3dp2ji9OBvKxOF36c+CT0jqcOa29OG6R0zG+7oMHBMvDU/lvrq8XPDxGT19xpiJvbZBd2PRJIfb5z4ZOyqWoRw8GoYURv025haz1fXuYO8wO2q7YF2aCMee6dVhLl2wS8mNRIXhlNht33MLyNwKP/lVUZUmICxa4xexAuvb3OlK2hcXu5Kog8hdNkQPGcE6z79uCSsRCEQwNsrgWAF6HsWUKdot/jqXBkhjHPDRt9MqQY/I+jz+gO6313fT+8ZJOGtGGgOY+h4bc1s3eV2jyKIpaAJ2LGdwf4yCybpdZ2FT7gtW15DX0wAT61gRKZNLEAADoHikw8l6e2K+Sk= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR04MB0362: X-MS-Office365-Filtering-Correlation-Id: fd9e2dda-3cb7-479a-abda-08d4a39df1b7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:DM5PR04MB0362; X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0362; 3:J23fWYWlQXajsRT37TFKIzqQo6+7QJlE+NvnzEE1/rUe9A5uxdY6FECtmPddlKH6KikkW77Zd4K+5ivR1iooxkK0y4qN2SAbApgu6RMSnTve9VGXJmsKTtrVfCmZAu5Ua439KnAbXdft/78/ngXQA7I0+lqOZ4XN9k6DoD/2X5EJa1DmikyBYsDIBmxvKNFF5aIJ+p2lleiRa5o0dFI/B04IswoE46nazH+6GISvwywpBj0c96RyUjFIR1EvpLSd78rcNVAdw4xeP56Zlvm6BSD6mmasT77IIse4PD2NbtXzsORs7ztCZDbHJk3JMmt4BTYuFVBhW1EphRfiG70gTDmsBLfAvNkO2yia2vw+lB2T12yQK8v5iX8CYvcKhJ+z7xeh++xiksn6IEloZKrGlX36LiDQkRssLiDEjR3RSrqRY5gqL4WdsP+1/jFxFob3y3QR1TcLU+VXSRTBTF5MWE6WuqBEZ0hEeqhcRd/XExzph9f+mjgI9TSw1FIs7E5x X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0362; 25:VQf3CLhIdz3exnR6rZNyKQiEb7gKw3OylAwlpWiDaw0n4VeWUcVxbIFiDBnmC1Bg5XYWxqmDCCmXNPT8BpIN1RMuX3Gxdx4rkxor3KEizEJjRpaAkWLkPjwFsKs3gcU75Msvr35JhKhL/IXDdhINJlrdw6bsXm9OHVmBNU5/9UezpTc9/T1LfB36gtOxRxGZcH2uuLQJKrIrKOipzRBPMpd+hzQr3UtPJp2O+ClRSWg0tp2fpc02I0A9TDNiAm8rM4gn5xwfpqH7XIRvLtBEI7+xCqpZ5+XeO31FaaVnSrbeKqW+o0GWQUPBMBb0oHsQ3aAeQEZW0j6zqjZuk6jN+YHyyBRebx/Nl8vFmBbVHgirsUqXNcXZLKFOWU5brS8s0RlFbjCrK8YWSDitHTr48zNX1So4Ku0Jz/TKbfzPhcnbuxWcBfBIbUQxbILDdDgagLRJzJVNtscKRaLSeP4VgXnLA0fzhe4XLk0gmy9zvdw=; 31:J6vPR03WXNQhCaonxQ2aTp9xV1BIiDGacZOIo/6P+Wq8FDXnF0s9yZPJzpGEp6VMkfhWQBBF2w3LxoyB9GAvco8rGjx/EBhwP8E09dO1uUJJPjEK67G6cJBO/zFIUsgWqIjKxeUnIQRWFk7xoyu6Cbh9EvB4RA+z0Nx95+ajPjW3RB4k+FRWwaXs63sXfX6U3Ih1kMZcZ+iCAlGCWXoSkaR1U10XqGLOct6Dxz9Z5qRmYckHDrPqDd9xnZSOOyMiJvV4CeuH6gSaVLiWyCLNNw== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0362; 20:9DsILUMBFYVu5aK10UFr9mH/+5r+bIfhAR3mANXv+3EbbwSQsnL1SOlGfxibBWSjgG97fviqXMGfvk/w6wmL0Jfu+0HGD2P1jmstCSLexBQjOhcy8IOlRDoZUo8YIyNjcGszTLnDypEU0Y/7LR1h/gpKjAY/qkVkJ1/GJENJkY7fr2suhiMw9Ebilvzp0NQ8gl174BwxQytcovhfHFWKeLMHrF2eE4yuT/7JvfPAp5MYgEpeNiLJMEcAdz7G8er2omPqKIyCzy7w+V1plDJKmTVU0ULa1zZzVtP4v1ZECAbaeHYZKkhtdL2Ja7UIudmFPsWFr2cRbFFrjs0/wkgzniu2ljSlLbSYRSfARi3ymTdjYGaCdjfP5lMk6a+cG8i+WhQXkF9VTiBf6j9RItpldOnQ0gBB4vBmsbZK4k5Kcpk+TR1PPqWcpCHUkbno1ND/ZtKlLrFErnI99uox3813/K/KhseDH4TM+fsn2yDKVGpvDjWEBEsn9dnx5P7+4WEN 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)(13016025)(5005006)(8121501046)(3002001)(93006095)(93004095)(10201501046)(6055026)(6041248)(20161123560025)(20161123558100)(20161123555025)(20161123562025)(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:WBO+C/NvWj+/6H1q59FNLbKksyZTqq4mHoHzq0ZOWq?= =?us-ascii?Q?bwPbNVSrtdhkVwSYKNS3+W/QuWhkpDQYvlBtFE9X98cAZceaS/2DR26D4vSI?= =?us-ascii?Q?wXShXJ0GlaEzQ7Kq/D45KexWA7Pvtcq7GwBK5K8N+pgrPOeEZ8OHOimu7qRl?= =?us-ascii?Q?0aqvVvpaONakadzAihfhXeJ2qemRYpa9RAvpQX84+Y70vFQ0Aorb3utxLeMf?= =?us-ascii?Q?AaH64AUdpCZD4wFNwnd6WuPwYRvOVGGF8o/xT45kKebkXkH/bhPsZ5KAt8Pj?= =?us-ascii?Q?bm9YMn79xNymoepyeGKK166Dr96BWeEhfzaRMW9c/0WxONF6AcbBR6w+rl0x?= =?us-ascii?Q?gFS2hf77sFnpcoQeLLPDnc5+48+FI7hLnofHyJQhiHJkokHjKSTvR26mVXkt?= =?us-ascii?Q?3e+H+zaj8iyZmKbXa3iCALuxaVDFriaaCnwt1yEVRJQtivaIaIhkQ813BDUN?= =?us-ascii?Q?ugtPNhDHflESkxZU9UvZRZSvmmktq9dQvpC6nyuP6DxalII8kYUKl0NickLD?= =?us-ascii?Q?azA8A69BRyteEMEmQ+QOQt6sxP5SXQNvVPHGxGxcx25Nh1Nqq4BspW8hiV/R?= =?us-ascii?Q?Jyxo8STEw5MkWTt94moQDBE2+8gsItTkVCR9ZrNMeChrytG480utsk2IwUbU?= =?us-ascii?Q?FpV2kByKu9yqkiTkq7jl/pp7XKt40QMkwqLHXgIxb9AGN9TLDHy2nUxSn9Jk?= =?us-ascii?Q?XpeNna6ktI3dXL5A8fxjlT+ANNrvWEg70jRBMIepHmV3STzHW6Lqe+M3TrGw?= =?us-ascii?Q?2UxA8Y4CngYUqErNFT4wt/QdRYKL2J+aRXX8BFQTXhqKPC7l7eQjNerlW7A2?= =?us-ascii?Q?8voVmsjLM3z/Qogq6y3rM+lEmgMcsp/UBB9l6Z/uqdukH6hwRZveXUVsLDuf?= =?us-ascii?Q?UsYfjEIrYj3uhQmTxuLiNwxulDWsAu7sso2ocVFofYUeND83Xi/9cCkPCrPY?= =?us-ascii?Q?/Vas9USorgEMhjEmuJmERMrHSK23ZC7bHHRI5t2TmdKTh9bQOdDXVFXcm3RS?= =?us-ascii?Q?8=3D?= X-Forefront-PRVS: 0318501FAE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR04MB0362; 23:A0NrsQY4W3C3YwY/CNdYVA6Bwjrl2pTdiIgDib5YD?= =?us-ascii?Q?dAyAyr/uuOBDrkJcarjHXLBPOqxSXs85dW6X/jUFnk7Uzm9bxqVxRPwgMrug?= =?us-ascii?Q?u5G0hJiKbh92SBXk3+ygPNXSiMEUyOROMmDL1aj7S1dP1II6W8kni2UVXMQP?= =?us-ascii?Q?/sYsreu1kUnrr/X8Hd3AqpjmDSAuamKsprWRdafEDGA0ZcuYhxhupRaStVz7?= =?us-ascii?Q?WYUTM2bvr247wqA+aKuTHtgNanv4GZrvn6G7Ho0dzCMkgy5+m079/E3yad+Z?= =?us-ascii?Q?wZn5GMBLkxsGOpspy7m7lx3a7qyjXDtFAfM2gSnm0RYzdWHqY+4R2wuO7zkO?= =?us-ascii?Q?49L0PHqPsys8blYdbLo1Xka9M6KkKiv4dq1P5kmOXGtk69DSHblxaiUCiaGs?= =?us-ascii?Q?Rf4N1XSyzScuWXxJQxjvISvIVtTEspqscz24CQ+mUeLB6W165PZoBYlk0mC6?= =?us-ascii?Q?BnAj3i+FKqNreZTbCbzx0UwMAI/CT7ZMbE/gn/ZrZCFyqQErBmmcG6eGcy0V?= =?us-ascii?Q?hnF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cBWY9QVQ+ZxNXs6XsUVnHN1TCr5AlrRKAW6GQBwDAL2xezFtSeFQANG9pIkXXWdUsDRM9KG6M+SyJbylbiHxgFIHsz9McBJO0= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2017 18:43:32.3027 (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: 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 Reviewed-by: Hannes Reinecke Cc: Jens Axboe Cc: Christoph Hellwig Cc: Omar Sandoval 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 5871bbe70ccd..dd9fcb163326 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 1404c1c01fd0..c3704baff1d6 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 5c1fec31b7ef..05b8a4d30ed0 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 a7cead2fd9ff..a539733da12c 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_PDU, 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 97d5a0bb7061..07fba6208554 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1903,7 +1903,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 48dd47e6bdf4..79a05bc341f2 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; @@ -2088,6 +2094,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 f903004f3cad..f4d3bfeccf2c 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 38e14cf7e74a..4874426a20b3 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)