From patchwork Fri May 19 18:30:09 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: 9737907 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 F0B5C601C2 for ; Fri, 19 May 2017 18:30:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E835E2856E for ; Fri, 19 May 2017 18:30:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCDD02856F; Fri, 19 May 2017 18:30:55 +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 47E8628573 for ; Fri, 19 May 2017 18:30:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932107AbdESSay (ORCPT ); Fri, 19 May 2017 14:30:54 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:16178 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755837AbdESSah (ORCPT ); Fri, 19 May 2017 14:30:37 -0400 X-IronPort-AV: E=Sophos;i="5.38,365,1491235200"; d="scan'208";a="20047672" 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:30:27 +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=26RpUHTFLnVaFtLQINjCzHLHYdOTFJHNdy/7pqlHEn4=; b=fBXNbaoNap17vi2xsq0pBoO5+XSI9VLln4WVUbUSoM3MucfbhBWS9aVbOsnxC+UyUW/0xsjA8sooTcRcRM1pvBcbOojThmNZOaIQw376AT3DrhAxjhcfCjqyaKIVqcMYo1xK6HNg9TwPhZEc79roiMLFTgXnM4L8lCVrW6cY4K0= Received: from CY4PR04CA0042.namprd04.prod.outlook.com (10.172.133.28) by BN6PR04MB0356.namprd04.prod.outlook.com (10.173.198.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Fri, 19 May 2017 18:30:25 +0000 Received: from SN1NAM04FT018.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::202) by CY4PR04CA0042.outlook.office365.com (2603:10b6:903:c6::28) 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; HansenPartnership.com; dkim=none (message not signed) header.d=none; HansenPartnership.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 SN1NAM04FT018.mail.protection.outlook.com (10.152.88.159) 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:24 +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 1B.5A.29323.FB93F195; Fri, 19 May 2017 11:30:23 -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-a9-591f39bfbc90 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 5E.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 , Christoph Hellwig , Hannes Reinecke Subject: [PATCH 11/18] scsi: Move most of scsi_init_command() into scsi_initialize_rq() Date: Fri, 19 May 2017 11:30:09 -0700 Message-ID: <20170519183016.12646-12-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+NgFrrLLMWRmVeSWpSXmKPExsXCddJ5ke5+S/lIg72fLSz2LJrEZLFy9VEm i439HBbd13ewWSw//o/JgdVj2qRTbB67bzaweXx8eovFY/Ppao/Pm+QCWKO4bFJSczLLUov0 7RK4Mp5/0i+4wVdxYu0/pgbGRTxdjJwcEgImEk1P9jJ3MXJxCAksZZJoOzuVBcLZwSjx+3AH UxcjB1hVY185RHwzo0T7tjdMIN1sAkYS397PZAGxRQQKJS5t62AEKWIWmMQo0bXhEyNIQlgg XOLigoPMIDaLgKrE9atfweK8Ag4SRx4+YoM4Q17i7JadYDWcQPGXxxeygywWErCXuN9XDzJT QmAaq8SH9bPZIXoFJU7OfAK2mFlAQuLgixdgvUIC6hInl8xnmsAoNAtJ2SwkZQsYmVYxiuVm 5hTnpqcWGJrqFSfmpWQWZ+sl5+duYoQEeuYOxrtPvA8xCnAwKvHwJvySixRiTSwrrsw9xCjB wawkwhttIh8pxJuSWFmVWpQfX1Sak1p8iFGag0VJnPeczNQIIYH0xJLU7NTUgtQimCwTB6dU A6P0R/f0x3WrfTaLfHn4t+eBswT3vG2Pv15dNo2pWP/G+oMiFp1LVf84+rSd933AE3NqVbTM tQ9dbarri5izubof8rzYddREO3oq3+XMK3Mq67bbn5rW9eRxaPrrCYef8/IIGHzhOvmRkbH/ m+tDxuzijWfbBf2k8rrKMhfnvmZbGLUujttXY78SS3FGoqEWc1FxIgDRO/p0cAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDJMWRmVeSWpSXmKPExsXCtZEjRXeXpXykwepVOhYHf7YxWuxZNInJ YuXqo0wWG/s5LLqv72CzWH78H5MDm8e0SafYPHbfbGDz+Pj0FovHtDXnmTw2n672+LxJLoAt issmJTUnsyy1SN8ugSvj+Sf9ght8FSfW/mNqYFzE08XIwSEhYCLR2FfexcjFISSwkVFi1fMJ bF2MnBxsAkYS397PZAGxRQQKJe6fPs0GUsQsMIlR4uWcJkaQhLBAuMTFBQeZQWwWAVWJ61e/ gsV5BRwk2vfNZgexJQTkJc5u2QlWwwkUf3l8ITvIYiEBe4n7ffUTGLkXMDKsYhTLzcwpzk3P LDA00itOzEvJLM7WS87P3cQIDg/OqB2M1yeaH2Jk4uCUamCccerkGR/DrlKep1vdSmTcjut2 x4qvuyPgd3a3/McJGT7mLDsCild/LDt25JHcemsFz01/Lc/8sL1//5odU9L5JddnsCXGqWc+ NfHREfF5xz8l/PBjjz2yvcsPrfn+TVdoq/DJ8N5IlQmmQSp/3i0vXy58QrhBakJesJRL3Lau jYau1nkvqpmVWIozEg21mIuKEwFA4t2+vwEAAA== 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)(39400400002)(39410400002)(39450400003)(39860400002)(39840400002)(2980300002)(438002)(199003)(189002)(9170700003)(5660300001)(189998001)(48376002)(50466002)(38730400002)(47776003)(305945005)(2906002)(86362001)(575784001)(72206003)(1076002)(77096006)(50986999)(53936002)(33646002)(4326008)(2950100002)(76176999)(6666003)(356003)(5003940100001)(478600001)(106466001)(81166006)(36756003)(8676002)(8936002)(50226002)(54906002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR04MB0356; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT018; 1:DQpqWOJvibABw2PAkwLV7z4SeFZ+NOMdFEY59pPfcIlxPjs/mQXw2dFLWQoqggOvbPM5RY6JMTem2W9BHEE4sJE9O4exbIFaLWp8Vk8wGsNAHX3xEqZ48EorDK7pZ7lo28Y4R/p5lVXkJVpEEYR9iKHzojjCTj+vbMmOuLP0QvOWqmmFXfZV+/QZViCLuxA0GD6S078rp+OeRXwBh4npdgPzHt0/PZN40czEQ3DK6Rp3nY0ZpHrh9VHcHMN1TQbiiEY2XVO9+zol/rKRX3mKdWIZSYYgLO5pAZrURTMUeXCE5POZupFxChI2qqCklomFSrV7M8TWh7Y7vvtARTEsGWEBXi8uUxLfauBec9G1LXSRzclWNSQXftb3FmouWsvxfmCpjbzU2DRv3Zpl2iEKyii03o3OhX3PoU/+f0T7nMULHVQMcUD+9kiqUaq+B0w0y9GXWo9YrijBUuIOmOvLVcL6b3q/SFcxTWuKgSQchHnRkM40K88utxbPYxBVW/4UOmFBIlyE/Fx3doLp6GLYYXaxAU2ayjnrthyskVxcRzc= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6PR04MB0356: X-MS-Office365-Filtering-Correlation-Id: 04ce107d-a427-464e-1ef7-08d49ee51d71 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BN6PR04MB0356; X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0356; 3:0A8BTNhiRdOvpBNdgksGaafdQ7I7ZoLoZ6hT0fiyA7Nf4NfWVESHzzu9QTKF2dldoObf5qNYk2aG3QW7IBV4IXDLCJtb4bdvzAEMiK4gq4LstKMrskpwPYWOHNTh8l7E6suHZNVFGxN9W1xzeCacRJ3WuxjOZRKNKGJGTUmu14CUQLDZIt4NnbmGjGjnxqAAcz0+z4aM8sCOAgVOg5XPMPga+B7OM1ZJfhRYwgtKxy6ruBkXs++xOGvf30yc9RW897o8PgcdSZi4wFsy+fFkPg7dAffeLPlzljja4kNN7tunyaSFBTLq1HGkVn5KlQe72IJiC8ykD1UVaMU4dZKjdIV0vXqJXUHmk4rbrt7iF6ztvnrZQ2bjwFbxQuCWM52m02KCDYVaaQCdJB4EcpuRMDzD5vyafJOkSTx1KpaKENWVT7fwNBW2EEQQq54RMSxCCj2DqEg+YbkOmxVLjtgITy5/12rBAkwW+Z+ao8g2NZtBaF3DfFCyHehCoMv7wklf1EQ9No4fIfDcIgVAWCs/SA== X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0356; 25:T7Li8CCTye+dE4N7lXzZV7DjWTTW2UoIybhM1BH2Hs+6DebpaBjc6qK1d8mb1tUNkjk6byWF74yh4p2DtkPY9C8PAVZ/J3TYYs73NOA1IeX3jhbYBGEkthpF6nFefTGF3isIJ+fVFiT4C0xDRvEOIYhO/mqJsHEXowOML8ZJ2wWAz//sN7sieQ7YvyG4YLIp4Y8HQkOn+RYGTXEuo/T27L6A8rB6wLaAfY0+2kQLncaZg04ZiaYldNGFw4LJVEjGSJgphzPIb6Srdi4TLcRws1QZCHasWH6rRiY4tSpM/7e1LZ4Yl/e+UhyTKSGk8q5EekmiWFJTLKwUEJs1+qSHHr24nTFfiB7oBdURHQ0r1ESafjr6N7fLmUii1cxnkOfmlSAGVQRyx0aNitsKqlzdYxezQyd6XEuaQ9jJC/OchkoXAf1THiud4d4//15qujqeESpe/AxHtQUuR/qsYMtOoEBAm02newQ1BfpYs+YFFM8=; 31:cyFwTUN1e4sx+UsSO7zUYPMzc2JN+elHDRVDbp0wlCmftRKRcFLQSPE4tGMRgHgg9aMJY81BA4g4MNfBHE5rCiyCjtkTY8XXlcLbtth9yrdp8Ooa/5oIkvT4/6z8CaQPsQAmkjSm9LHEVJcNgvrBlPqqzZA/40cRpwL4fj7yYqlFXWa/Cvd5gpuymZ2i1IsA+ENWo4lx2wwKjy7bsY3UM7QRyOCJaOIbIYmepyjj62gspxa/5/gj59awzAKLDEaO5ggfRiGvaawNJRQ+EvuYcQ== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0356; 20:gBX7ymu0eiVymD8CEE/VTmMMTFyyPSmwIgG9ohsMfBpBYgkjCXxy76kkaEM/2VCxoHYM9GAcNFg3DJJP6QZA5g9Jc96DQBYDyPecZ0+Y3lPpCwkICOc4tf97i76EdVtkOIuhfKXSuTizwvaJEVyYeabVJ/pHt6SWYPmE2cB2FI6nZ/AzWG7GB0PR8CQ35aPwmncTfzUb5wWR0/nVaeO/VHu7tRigdPFQ1UwCP9h5j46a4IzPjUFtMVBcsBYwklJTXAIj830uWpMwNsXvHrYAY9VcEvPm6dFBkCeQbkxUUhCDcXp1vSePd2Gyx01aRzIJkUzcTqIxUj6YFFIV4ZQt3hLac9EUveIIODNnsoveqjIo3JFeMNMercTySilSWeH3/9rp3BqbmQtVvh++RKAZ+t9DV2PGXKWT3nWrmI2B4d21akVgStt+dmgJGCLSAo2ASOeD+fCbWkWtyQvE83GE0k2XDl+MVXrX2o0TqCu5JU6oKD3O22YnKYyuRKTeMJZq X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13018025)(8121501046)(13016025)(5005006)(93006095)(93004095)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123560025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148); SRVR:BN6PR04MB0356; BCL:0; PCL:0; RULEID:; SRVR:BN6PR04MB0356; X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0356; 4:wuofut1hicbvWDRWfC0o4jymFUZ62qDnxynjBPNGPnTCsptuGilMOVHIzVd8pE3QDhISfCDH5L5c8vVLk4e799FkggF4SgJFvwnH1ryMCdcPVSW3isBz1gsF6nUMvhwngevhrdrAp8tc4t3iMN+CBV2dQRhkFBtRQFkUS6L9x88ZPoSaorYGeM/f6BShYwnEyTmdmXUz+zIh0+usXUZwLVVlrDHAwFRct1LAalLzJIaupD6XP9NbGxaz1CFEJHqowaN4ufd46bBWYV8+Bz1DjfoMAa+VMk6GY4gd9SjL4jPtWAMfbxMT3qD1NoNffS+CVzAHXi+oKH+o3MsGbeG4AI9f78VMZ0qxwQyB/Sb+bLsoQPJi7100DcV9xW16ZOZRI8d66gmil9ws4qpqqU1pVbFjHA6+mn7RBakk4ePBtnmpxFk1anBxdgISITX+SATWmAigTHbuQXQkg32r6Fa2jeVjb2/tm51lZ487ekG+n1pwBMlp8vNCH3uPNFPci/iHTFkhfwQOGyjvmDJfKfoCZoKYDPMNbTdaGqoov/QSxFkrUYT0jRd0lmjS5O5qHPWM7XcCSKbN3zf48EhrpxPsFuqfCDNzjCIAKLLSH8troA/lR5MumxC4tyQGbsT8rNvqQj1dkDlVbxifvioUA5MIqNPyJqt+WQYhm8OLN9KVfNd8sK9RDmO7uUu4eVX5eXPOQJH0f6UJbG+9K+YMHEPBtGOxRRRyb5V6KbKZNiEDp3A9WYeD01U6GzvNI5q1/hblqMs+fMLPt5cDZKpuWhc8JAUmgVWhhjfB/pSuXvZjEt6Fsvo3/mxJhhxc9eHFlntMQ2VZ+kWfbbmUQp6HxI0vqHeLdokGgolafozTw3p9lX7B1QwkSZ4lFzAFChXIkVK4 X-Forefront-PRVS: 031257FE13 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR04MB0356; 23:6bumLw+5h0IaH3iOXulgDRzLLiaje7l+6qGHYbaTE?= =?us-ascii?Q?/Dh6L73NKLUbujuHtBdUNKGqgD2G1q/bS8j3oqeWtLayWzZ41qDaQ8Nwaujx?= =?us-ascii?Q?dGxz1eJKAHbM+bKQ+5sLftORR028DVWf5HgP8hIP4tIkDXqj3oHKNZxYnpBU?= =?us-ascii?Q?Qj2hilw853JIVU4wP4i353vv57LJwy4EkSNuc7d/oU2tyeWNdmCfAzWC/oWE?= =?us-ascii?Q?k74e4A9lOOPlw8hFQAI3Narpi6fBfenMDSOIk7KqnYEaDGAfAN0ll+x6xevd?= =?us-ascii?Q?sXuLvM2mVFFPzy1m6lk+m+V6K5jQlhqOsHDUz4osm69wfzEDRip2PadDecz4?= =?us-ascii?Q?eNs1db0Hfgvw5KrqrDZuOhvtQOGw6exwBpMeAyrl3VTSoEzVUIhqBfhfmeTj?= =?us-ascii?Q?yzjJY43XnOYlEaeX7yz8FZ+C/NO7RQakUZcpEv0meDN5pSUxRbpa+7mgHSZG?= =?us-ascii?Q?MvCdyHei8ogUTBxN+e1jsn+dFhZH9qrVloJK6g4Cv2d047YTLt5EQAoZCSJY?= =?us-ascii?Q?nDd/jc534lSSQCs9w/flpLBXWfgLBG5YAy8UIyAXjTH8FD0vpJYnuQ+6d50c?= =?us-ascii?Q?KoIDMISL02B0j8+obWpqh6rnXugWk6bYhamv8tsruSq/PPe+nX/Cj6zQiGfJ?= =?us-ascii?Q?1+iAGD6u0/TCXsof5Ux+SFG0merEo87Kqt3dRYudDs9zJ3TX/5FgRtojNE81?= =?us-ascii?Q?VlmuXBODk+8z0pcewe0qie+A12V9Y9AGVk3rJENnghm6B9abzyfKEvztSdm+?= =?us-ascii?Q?08GAHKexV+yQs8b3cGV0oMqBbbObaQI0LnM/ECaERjcAMTVAnhTAvycflB7h?= =?us-ascii?Q?rwQT26iUCIxwedStfs9N1Q+2bthd59OZz9fgCadocpbVnXshYWnWvmNF0RSF?= =?us-ascii?Q?+EcO4SHGdQv3Q5N7T1qS36Dok6TqoTFpV2OlAedtQK8MlAV7nQLDzJpGF4fs?= =?us-ascii?Q?C31mMCP+26sONPCTYD1xAiWCj7VqSivIUT17c6vc99Oka9ydx0+xwGTlnbD/?= =?us-ascii?Q?UzEDHXSQs4rhrvMVd07xNmZ6uq/DYYZ5krLFprleIiSY4HBfTH6sNyymQZ/7?= =?us-ascii?Q?9rTbBsEGR9rXoUNTugvbeGq3WtO?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0356; 6:ozV3Bz5rlXaYuoDdiwZ9i+7yROnAEhjWrOCNKtanGpudbUPfkxXFIIqZc6K6bqzeJ+tnecIJETikXVGWwpO5L4Y2bdfgi4jKsOe8M8rr8T3VHYeavOE2HsQ3mfjSLDLOXqTQYjU6sMzHUbHtHaWDVDL3b70WlaQvCPkyIUFlRtUdZ2lftz+pG76OkSzuf46dSeLfVmgK1daS98pGEa5PnlzYh2/k0t0Z8RwSI+MZ+LiADl7ZZQhisvQshx7Qj3kgU8qOHoYnj/gf4Votb2BTXBhfsv4G9GNvmuQbI7QUJZD0RkPky+ObJ0ckd5dR6pSpBMwGRkz3Fn/2MjQaxCjV/zO3EVqo8RlSyGCwDSdjaqNW2rSjYXbOiXwHWsyFM1pb750f2E3ekR+SKCNdi0kTbkF67x1KdS4EGsFleng/rs/uALQ2+UtlkuEhtem5EljWaoaHmM6oHxLGmgKMO+NuiaWykSxpGwCReMDA5bJ8iFAkkFrbRyjefYtDA/ryecPmIoj0wQi9/PGjeJZpJwfV19wyLFKpqXEOm6RIujdrZ6Q=; 5:Vbwdfq0UWbsEFL7YPIEpmKqnWD0zmz8YWiiutBTHZu3oSLHojy5oy9FWnmAlcN7aMGSdNr18TMTHdof9rvpg8GAvTG2oFx4Qn7CC43v9Xv+S4v5xcM5WY7RFlSpL+TAfjsAHhKu4a84IhEwmSReynw==; 24:uReDm1PtLbJbF39Eow0gmpHftjfHbKwgjqNuvxC17Wjskc/VdsI6HDBQ5Pz7axD4kLDHUeUZR2cg2YqseEHZlOJ3QwzEFxRO9muBoCvsUwE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR04MB0356; 7:d6I+XsAKkNGm2K2EmltYIreBdpHWh9TDh+4yZlgHOVZmTWpxNQhX3h81qqGnelyLQYrgjOVl8jjr5sYKyoSa9zMvZ+1wobvmtCv0Zh5TA/2RRRdgJo/7v8AB5+0Ty4y3SNEc5XrtLRo339gQ2uN7r6QrF0YRGd4ADQ1T+Tf0LPHWJrp9oU6Ahoc4AbUQl0CGq1mIcNY3GLkvRC2Qr37D4m+1bTaxua38XYBnxPEj4KNGDerUctrifj58/WLPnPgEkWM/C+jJgYG9CD6RC1EcbxCcJQq08srohmA/43C7ANKs9BheHqDIXdh7IE6DXmAg/qtd4KG+dKCkNMu+3iCJ+A==; 20:/KDQvEGFPtYItU6saGeK35/Wud2p8yEIWEIl7xs3ekoSf/+rqYrdukDOghrlRmO3xbn1EqbtRy+LCWV8ermVZw57ltPlK5fG6iORD0IzcFMHfhGWRQ64dn/O5RxNRMP46qBHK83GQRs9gMxs1G9rs42cafBCMOHOQZj7TO++fAg= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2017 18:30:24.0047 (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: BN6PR04MB0356 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move the initializations that only have to be performed once and not every time a request is prepared from scsi_init_command() into scsi_initialize_rq(). This patch also moves the jiffies_at_alloc assignment such that it gets back the meaning it had before commit e9c787e65c0c, namely the value of the jiffies counter at request allocation time. Fixes: commit e9c787e65c0c ("scsi: allocate scsi_cmnd structures as part of struct request") Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Reviewed-by: Christoph Hellwig --- drivers/scsi/scsi_lib.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index a8d4f17ad5aa..68ce053b184b 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1156,26 +1156,24 @@ void scsi_del_cmd_from_list(struct scsi_cmnd *cmd) static void scsi_initialize_rq(struct request *rq) { struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq); - - scsi_req_init(&cmd->req); -} - -/* Called after a request has been started. */ -void scsi_init_command(struct scsi_device *dev, struct scsi_cmnd *cmd) -{ + struct scsi_device *dev = rq->q->queuedata; void *buf = cmd->sense_buffer; void *prot = cmd->prot_sdb; /* zero out the cmd, except for the embedded scsi_request */ memset((char *)cmd + sizeof(cmd->req), 0, sizeof(*cmd) - sizeof(cmd->req) + dev->host->hostt->cmd_size); - + scsi_req_init(&cmd->req); cmd->device = dev; cmd->sense_buffer = buf; cmd->prot_sdb = prot; INIT_DELAYED_WORK(&cmd->abort_work, scmd_eh_abort_handler); cmd->jiffies_at_alloc = jiffies; +} +/* Called after a request has been started. */ +void scsi_init_command(struct scsi_device *dev, struct scsi_cmnd *cmd) +{ scsi_add_cmd_to_list(cmd); }