From patchwork Wed May 24 00:34:14 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: 9744793 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 3D3A0602A7 for ; Wed, 24 May 2017 00:36:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3017E2885B for ; Wed, 24 May 2017 00:36:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24E3528867; Wed, 24 May 2017 00:36:26 +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 A4EE228865 for ; Wed, 24 May 2017 00:36:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969011AbdEXAgY (ORCPT ); Tue, 23 May 2017 20:36:24 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:5769 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968978AbdEXAfx (ORCPT ); Tue, 23 May 2017 20:35:53 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208";a="19885600" Received: from mail-dm3nam03lp0020.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([207.46.163.20]) 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=q1N4FAc13nKyb/CFP4NgeM4fkyeK6y2W2c5jJ5wgkNo=; b=CJokKuto7v1LCSGapkifGU57ZU7C/JvszUBjhQTyTgLHmR6fZD4iwMBraZnb5ZBIki1h737vil/ymy9CNLrPP0T7mv5/2s7L5dZWvAe7eQXB4SC+9bjEo942ysf7Cq5FAeeVXEirPVGYB79O8M4qk4+MyC+dcDHdhmVfT7qFJ7A= Received: from CO2PR04CA0111.namprd04.prod.outlook.com (10.165.95.13) by CY4PR04MB0503.namprd04.prod.outlook.com (10.173.190.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Wed, 24 May 2017 00:34:29 +0000 Received: from BN3NAM04FT052.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::207) by CO2PR04CA0111.outlook.office365.com (2603:10b6:104:7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Wed, 24 May 2017 00:34:29 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; lst.de; dkim=none (message not signed) header.d=none;lst.de; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BN3NAM04FT052.mail.protection.outlook.com (10.152.92.241) 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:27 +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 6C.43.45291.215D4295; Tue, 23 May 2017 17:34:27 -0700 (PDT) Received: from milsmgip12.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; Tue, 23 May 2017 17:34:23 -0700 X-AuditID: 0ac94369-166ac9800001b0eb-01-5924d5122e5f Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 2A.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" , Christoph Hellwig , "Hannes Reinecke" Subject: [PATCH 25/31] scsi-mq: Make behavior scsi_mq_prep_fn() closer to that of scsi_prep_fn() Date: Tue, 23 May 2017 17:34:14 -0700 Message-ID: <20170524003420.5381-26-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+NgFnrMLMWRmVeSWpSXmKPExsXCddJ5ka7wVZVIg+1LmSwWvNnLZrFy9VEm i439HBZ7b2lbdF/fwWax/Pg/Jgc2j2mTTrF57L7ZwObx8ektFo/1W66yeHzeJBfAGsVlk5Ka k1mWWqRvl8CVcWThNMaCUzwVn/pusDcwHubqYuTkkBAwkbj/YDlbFyMXh5DAUiaJTwd3s4Ak hAR2MEoc3lQFUzT9zRVWiKKNjBK/Xt9iB0mwCRhJfHs/E6xBRKBQ4tK2DkaQImaBTYwSt6bu ZwJJCAskSEw73Q/WwCKgKnF88xNWEJtXwF6iq+c3E8QGeYmzW3Yyg9icIPFXE4DqOYC22Uks 2l4BMlNCYBarxJKmdnaIXkGJkzOfgC1mFpCQOPjiBTPE1eoSJ5fMZ5rAKDQLSdksJGULGJlW MYrlZuYU56anFhia6hUn5qVkFmfrJefnbmKEBH3mDsa7T7wPMQpwMCrx8CY4qEQKsSaWFVfm HmKU4GBWEuFdvgEoxJuSWFmVWpQfX1Sak1p8iFGag0VJnPeczNQIIYH0xJLU7NTUgtQimCwT B6dUA6NyrdXsGOdDRa5+4cYvN1bKrnHfL1JSdztPLJzv2KPaG1dPzP/7rqlqhcf5DcypP/NN 3r67rDctfeM/i4/PFDuXRJadenH7xyzWFcVTM7JldTqqBHx9fzMe108I3C1/iFNs3le5w8ma ojxL/2zrfMW6WYyh+KBEkAW3dP7GO/Vn9pkp6GztjVNiKc5INNRiLipOBADSdEDwdgIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrMJMWRmVeSWpSXmKPExsXCtZGTTZf/qkqkQdNyeYuDP9sYLRa82ctm sXL1USaLjf0cFntvaVt0X9/BZrH8+D8mB3aPaZNOsXnsvtnA5vHx6S0Wj2lrzjN5rN9ylcXj 8ya5ALYoLpuU1JzMstQifbsErowjC6cxFpziqfjUd4O9gfEwVxcjJ4eEgInE9DdXWLsYuTiE BNYzStza0MYMkmATMJL49n4mC4gtIlAocf/0aTaQImaBTYwSG172giWEBRIkpp3uZwexWQRU JY5vfsIKYvMK2Eu82n6ACWKDvMTZLTvBhnICxbteTQCq5wDaZiexaHvFBEbuBYwMqxjFcjNz inPTMwsMjfSKE/NSMouz9ZLzczcxQoIlagfj9YnmhxiZODilGhhDl3xef03Tm7uKO0g/QNh+ S3EYq8udqAMs6jlpV+5aVJ2yCohhWq5711XMc9bRE5fWXvT31t8YWaL5fpULM/+c2SzunbP8 tq7+5yUtX25f6/igyGTCvZYnRs9VKrq9hNsab5XuEF7Me7g1xPrn3zPZ3XcfyEz8zHxm1ckv 95e/NNyyVGfKBGYlluKMREMt5qLiRAD9lKb6xgEAAA== 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)(39860400002)(39410400002)(39400400002)(39840400002)(39850400002)(39450400003)(2980300002)(438002)(199003)(189002)(9170700003)(50226002)(50466002)(305945005)(48376002)(1076002)(4326008)(54906002)(2906002)(72206003)(5660300001)(2950100002)(33646002)(6666003)(53936002)(47776003)(8936002)(50986999)(8676002)(106466001)(86362001)(77096006)(81166006)(575784001)(356003)(38730400002)(478600001)(76176999)(5003940100001)(36756003)(189998001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR04MB0503; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT052; 1:8iixfqe9sWH67njHTJ223sh11g0vklnrNXpzuDKbYZqLjC5Co7lPG5UWgP9jwxDcDpHPOScSx2bcQPagWQLPu1/MNRVRaHzq3bHwVrX1kB3j7vkiEguAMrbrfHM5dMp/rFEFQAWulUGWDoGtOo5y6B1c1FI2Q1ee8+vWwrFTh68LKpmEVnneiPE4EHUgImMxIzLZtG9tNmi8T4sJyoECVZflKc/UwHTMBPOUFesIUiOY+NYx8/sPPKoV10+xPQW47A/KjQ2X28h7HWcO0qt6fnh/ck/dCX9lL/5i0fybcqQgZNhIzBjWhk74I81Rh0rWTtS1zbTa4xOpqm6a0KnZRwSD/VWV4zTc8hOF7dCipuhzpAqRynRQ2/sAD83X2GmUklWHx+Kzne1682MwAPIV0snE5e+CN3nV2aI1igHMfgQAKtroKVZItjsfSsYtdhxGwmzciCkh0WvOJRBarctmDHn82YY4Rh4p+XFVSxTGbIlcIiyOY/Ue7qbI8bEGfHoqSisXsTqP4saQfAtytQbvY0Xhu9u5RKwpD/h6Mpy3j/Q= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PR04MB0503: X-MS-Office365-Filtering-Correlation-Id: a2c199f1-8fa3-47fd-a881-08d4a23ca32d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:CY4PR04MB0503; X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0503; 3:RDxTWmR2xufys/pbxx20xr67RwbvpoB6Ui0nAd6kvgaE3riGj7YUoU2V/1PgvwCVC/lsXvYZdDo7Aw0lPCJoXvO6WpHmIFPi5Qk3U8/Sp/P+8EmOpoc7gGO6WgaTNLmIcU88L1VFJmsrAclkoi+0WAbA5kmowFO6QwUiGGilg2WcF5kNh+qzVeaI3D8Fx/mev+0EwYpJYCV3EHMKUcRlJ/yS49zaULheXogpurL5GuV+LHUwDeZNRGJUdt4QffaNw3NDyTn8Xt9c9JtQ28ol2mZIeTPr1orb2W7ak1T2HU2OXAtP1MocpOtxmucd8KNDCODZypGQvn/c0nbMMpYG5bpabO1wnVA2pw7urLx/sZAcNs5Acf/uSOT419vcS8lUnxHATU/1ik2FqUopgX2oBFd3hfNoipY2jb1bAiN84Z4qhz/Zaw6bkxkHZPVACS52ZsryClWhTPK8cHyDbrKIeC5o2d+7i3ytqgtgXxJUtyWUrXjSzpVZXKaMSN7P++rQ X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0503; 25:OBSWY2dxSTehXSjaDa1JyHtaW6+f5zeLPaKji+GADx7H0Wje7QcgBRNwz8biRNPXvWn5PvTDlL4uXGfmhibXxcynk0HS+PM8kSY8xGb9qiSMWqvRNJA0p/kWIzpC1utUHSR/hQnVad4eCtcNQxz+iS+618N3S8TXoePHrN0MvB5NSSNREv4eKyAc1/fRIjPB9W+ymAE6uiVccqvFs/KkvKAXH2fymDKJLqEHbs3FleQwAsEKRIcPbxsudHwSHQ8g9ozar1+r/2ISjvfMoJdUx65ey9x0XbkQZYAJqwjo1Iugk07HPe4adP3ERIKMU+Z56IuRpSpcSk6TeglNTxOClW/kvpAJTfetPYK5YYcMP61/OWPatMUJ/qmYhrqnoEBz++R+PmYfHXhThPixghL1Qg4ql1j9yRanxHAEDH3PjgNP4RYtXzG1bgBpll01nMsImPDcjYmHSgUq1cEQRfwBSyCAKiJvjbIUhS6uQJ14teg=; 31:snm4Nvmvnrg2HjfJF9jBszbVfST6QrVM+j/wGujL/ZbBZRPMYJ7B5hD33ho6o7AyAzC9Ousmr5VCxzXHBGymZn/7W+nOu806fwxfyuTW60DM/QPQ4zv1AXgfkbgq9lfYLgIr2G/7FisUaVPCC9QCSzg+MQ+JD9ulTUUTvROzGFnyGwfkegH2wvgovi2vtpy0y3UJTG3i13mCnTR2Lra/580yZ1fQcbgaD44m9HJWhnPJ0ZtIHa+w9eRqDVo8Eyb+rDYX+1+3ZeWMUnlIBVJryg== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0503; 20:jf8Fe6w38h3SCwmhu2CCDCMSMNYA9ZKip1kXYHJZ/rrAi6B95Q9UqR2Uxv8D/ZNtErqxeuKNoKx6ViByfOfVF+ymQS6vL4cJS7aeYz7ByBI5uVvIXwE87sauYiw4uu4r4Z7AA+qvfhoUhcr05XZOCg/ashOMZMeUQx5GfXmSrhEZGu6gsa8i/i9LKCNi0tdTM6wX2OEFk/BqIb/DvfYVPtj/qX6L/7rXxP3nw4TZLLA6fTPL8qqC5TDWRVdm6JW7Bs6m9O3Lt0p6+awqbVk7LAYkH0YxAdHJcxNKNPINdZ5BNQGJCNAwFYd6v3tWJAaaU6+EM6iJsmSKUGst31Renolli1HCwzekELgSiQhLk8jEJ4UmxFuui97EEV9Krh0GPnMzNRjPQqXKHfoLwnazjokUw1v5SFhClnyr0YCkdBn71rbRI8nq6vz8OrjXd1HF8k1DZAa2OBm7HJuSfBdWqangPuI1IVMHGXC/JLfrrjaF/Cd06dIRThHpcmWmxgpj X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700052)(100105000095)(100000701052)(100105300095)(100000702052)(100105100095)(6040450)(601004)(2401047)(5005006)(13018025)(8121501046)(13016025)(100000703052)(100105400095)(10201501046)(93006095)(93004095)(3002001)(6055026)(6041248)(20161123564025)(20161123558100)(20161123555025)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704052)(100105200095)(100000705052)(100105500095); SRVR:CY4PR04MB0503; BCL:0; PCL:0; RULEID:(100000800052)(100110000095)(100000801052)(100110300095)(100000802052)(100110100095)(100000803052)(100110400095)(100000804052)(100110200095); SRVR:CY4PR04MB0503; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR04MB0503; 4:dviGrhhNNAUN6tYI8gAlcSlKlr2vrSBxB6VgneiqWU?= =?us-ascii?Q?FyA78nl6+xr5RC1uAO7OOlN7+qBgamG/EAD4ed49L9xgXybLaNKyYpAumXhQ?= =?us-ascii?Q?MzOOsMsRZf+MAveVhs+AvbW9Y+zqOBaal/mxVquR1q9lQRpGXS/1JCiBdjlV?= =?us-ascii?Q?JOUr6L/b0fJr1IN/Jqk9v1XexAADaw/M2cwEX1OF1fh/FfqDJ05K1xBPawFm?= =?us-ascii?Q?xprv1uiZ+/zlKrCM2CSYsoBgQmpd28QGMixBsGqxRORhAlMzI8w0fHY87Cwa?= =?us-ascii?Q?h4vsMNhnjHcJYsCA0GZr8WJl7Kl3f22OSjHPQ8B5DbFXr570iPuvwdQFSoN3?= =?us-ascii?Q?dYWf69nXlZP8qrQr6meOpiaWbrOLGoFGYrdCszOIFMqpO13V6ruHYGhHuTaR?= =?us-ascii?Q?9k3o9NN+9IZYJ4aTS7PFkeOrn9Yh0NCTP0gd5emI0Vn2hNMVVLmtIlT+JWq4?= =?us-ascii?Q?kak4MvQnSYBSGDzoXAvSTqtt+FdQn2LryLfYmeY9QGfxmmhPQtz5i0jWh/SP?= =?us-ascii?Q?s+LOqEv5BPmwuMnHGv9P1/6gHaTbOfVy4xeAsLDC4KPygkLyx3R+UnIXHdKl?= =?us-ascii?Q?uaWCe2pcGuXniSolyAd+BAPHxBJtljhc8qiKr4M1vp5aci6Do6nKGCk8ROs2?= =?us-ascii?Q?Yq2JvVi+UA3NX3G8uKlwvRLOMXf/qEWotE6zXStiSYyEQ5TfoZL+wIMxjek3?= =?us-ascii?Q?mU+fM290707g0ZKHlhLWY540JGSyvxDLqD9nMlwb74/kA1R/VJjdYYfWj9xv?= =?us-ascii?Q?o6FPWwCdKDEDRbmig7vMgyqJRQJEpwW1KvBLhhndK0DEVTH5N4m1qeiuONRO?= =?us-ascii?Q?wk60BVnLLBJ7DqLyEo5yNJpE5KPdrmADsDCgJlLiatF83BuAL9H8rFjTGkXx?= =?us-ascii?Q?JvFEQDO51kEUQn3IFDqNpGAcpYOlDS2CVPfpFv0zrEq+wNjdkQA+rbWvR7o2?= =?us-ascii?Q?cYDE1Uwbi2ixlELSPZEGx8SJs/vG/cLp12In8GFHnl0I/LurIUITD8vRGHXJ?= =?us-ascii?Q?wDGjJXc1z5q23Zst8uKkX4mtvwHE5ep4FzP0wDjXav1fNkjJTSm5De7uJ78W?= =?us-ascii?Q?m0/ckaH3O8327cQlLSP4DNkpJzQbAHEW8tvs5coeqWIPUZ3je1Ii1TxS6l6b?= =?us-ascii?Q?qkD/90d0qPFwjO46stJIrwiX9UycTUvZ9dmxvxT4+BbLBvGbSn+IXB/7l09y?= =?us-ascii?Q?zFG+5vm3Cbule/V2Ctk2c3jRPCrPYX31VukTcViyTbmhtSu3Tv/cHu08URia?= =?us-ascii?Q?lk1QtYMsP+Qb5bHwE=3D?= X-Forefront-PRVS: 031763BCAF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR04MB0503; 23:4zcibFL3nH1RNDVBiLrItoORpmuknN95suBeEyvPK?= =?us-ascii?Q?GUZQt0RlXJ5/gM8Qy3gAuBh3c8BfSyz7jkKd67qC1uTXbZ9EJhkPT/O2nPJr?= =?us-ascii?Q?swq0rKYwEFr+UlUAhc/j4mguLOI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u1ByrbaYTU6USIPXQTEQFByptgrH/wtQn4dHd2wCcXZcHLRZXj6FgHLryRWuAlqzAFBh5zUuChKTH0pJnyANDDp+g9Wepl7ByE1SLJk1/5/DwMM7S8uRQ==; 24:QKJAz8cPIQqD9mYnfiwqjfzvI6bXeDPU7hAU34WNCcL1HIYljaopVGmvb7hH6bwf0A8DaEvCDUocBeSuADCp7JWKLXithvcisxQaLAc2Rdo=; 7:K081xl8vljKJybObQSxuzfqiHuC+dFf9Tjg9o3tggKvn5WiSke4eywbRqTM5E4ucVXF1CtbME0rguf0frghbdAfDBIcUIzAYfHuInjLflF4K7KWc+rOhqqd5kACXXKJpEq0Iazl3kpT+K2PdWvzvBjd/PigJPLe/ZAJDl2M8+UzmeZWLSVE36202gvGSLbnGaoRdxbgZsYIHGATj2XYlPPwrgEXKYSwYJwXhtOZyQVFl0hnPynkM8BqGAJprv3hEVgURHVKu3KhJDDP+W3vtx3HxZ15GsgWtcsPdKxrtXxXp642oKQ6/vmS152x2s4dOz5nq/+V9IhV+jlRAj7nC3w== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR04MB0503; 20:khSJuoMN29WHu2LE0b0iMkAV9YKvpH5n+UBwjqDjiU7Ni6U9REG4ogVJ2CVVxq24XFKGRTjI5WjkZWrqWiWOMZcjmzm+UVpdVsiSN6B6pZ/ulqsFkG1nioZ6HLO5FzOwzgX/Gjs+gEYosLLu2pjIvQ4VBzjhiUT3gulgtfJciiU= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2017 00:34:27.9876 (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: CY4PR04MB0503 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 clearing most of struct scsi_cmnd and reinitializing it, rely on scsi_initialize_rq() for initialization of struct scsi_cmnd. This patch fixes a bug, namely that it avoids that jiffies_at_alloc gets overwritten if a request is requeued. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Reviewed-by: Hannes Reinecke --- drivers/scsi/scsi_lib.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 4b24c45fa113..12fd2bb0fe9c 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1861,27 +1861,17 @@ static int scsi_mq_prep_fn(struct request *req) struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(req); struct scsi_device *sdev = req->q->queuedata; struct Scsi_Host *shost = sdev->host; - unsigned char *sense_buf = cmd->sense_buffer; struct scatterlist *sg; - /* zero out the cmd, except for the embedded scsi_request */ - memset((char *)cmd + sizeof(cmd->req), 0, - sizeof(*cmd) - sizeof(cmd->req) + shost->hostt->cmd_size); + memset(scsi_cmd_priv(cmd), 0, shost->hostt->cmd_size); req->special = cmd; cmd->request = req; - cmd->device = sdev; - cmd->sense_buffer = sense_buf; cmd->tag = req->tag; - cmd->prot_op = SCSI_PROT_NORMAL; - INIT_LIST_HEAD(&cmd->list); - INIT_DELAYED_WORK(&cmd->abort_work, scmd_eh_abort_handler); - cmd->jiffies_at_alloc = jiffies; - scsi_add_cmd_to_list(cmd); sg = (void *)cmd + sizeof(struct scsi_cmnd) + shost->hostt->cmd_size;