Message ID | 20170524003420.5381-28-bart.vanassche@sandisk.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-block-owner@kernel.org> 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 04370602A7 for <patchwork-linux-block@patchwork.kernel.org>; Wed, 24 May 2017 00:34:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB97528867 for <patchwork-linux-block@patchwork.kernel.org>; Wed, 24 May 2017 00:34:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E06712886B; Wed, 24 May 2017 00:34: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 6B33628867 for <patchwork-linux-block@patchwork.kernel.org>; Wed, 24 May 2017 00:34:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760497AbdEXAey (ORCPT <rfc822;patchwork-linux-block@patchwork.kernel.org>); Tue, 23 May 2017 20:34:54 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:57614 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760538AbdEXAeb (ORCPT <rfc822;linux-block@vger.kernel.org>); Tue, 23 May 2017 20:34:31 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208";a="116871009" Received: from mail-bl2nam02lp0087.outbound.protection.outlook.com (HELO NAM02-BL2-obe.outbound.protection.outlook.com) ([207.46.163.87]) by ob1.hgst.iphmx.com with ESMTP; 24 May 2017 08:35:36 +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=3+OoLV83OIeIVPckfDZVAX+81JklZtxbrK5SMP/ZW/w=; b=gm7uUndUKmUonAyGEGvYpY28Kx51Rkoc+b+UB3dH6U1iEXegHp3m1PYF7SBALsRg+5M/y+IKoTBYsTd3Pm38rD+a7NqNjBx6qSF+NtXT2I1aFflKf1uydc3kywye05yDFxFihFY9E72YjokwyxRqwsPodA1G4mLKrJa5o9DTBLA= Received: from CY4PR04CA0034.namprd04.prod.outlook.com (10.172.133.20) by DM5PR04MB0509.namprd04.prod.outlook.com (10.173.170.14) 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 CO1NAM04FT048.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::205) by CY4PR04CA0034.outlook.office365.com (2603:10b6:903:c6::20) 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:28 +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 CO1NAM04FT048.mail.protection.outlook.com (10.152.91.166) 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 0F.43.45291.315D4295; 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: 0ac94369-166ac9800001b0eb-0a-5924d513d00c Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 1B.A3.18148.F05D4295; Tue, 23 May 2017 17:34:23 -0700 (PDT) From: Bart Van Assche <bart.vanassche@sandisk.com> To: "Martin K . Petersen" <martin.petersen@oracle.com>, James Bottomley <James.Bottomley@HansenPartnership.com> CC: <linux-scsi@vger.kernel.org>, <linux-block@vger.kernel.org>, "Bart Van Assche" <bart.vanassche@sandisk.com>, Hannes Reinecke <hare@suse.com> Subject: [PATCH 27/31] scsi: Consolidate more initialization code Date: Tue, 23 May 2017 17:34:16 -0700 Message-ID: <20170524003420.5381-28-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+NgFrrOLMWRmVeSWpSXmKPExsXCddJ5ka7wVZVIg/U/zC0WvNnLZrGxn8Ni 7y1ti+7rO9gslh//x+TA6jFt0ik2j49Pb7F4rN9ylcXj8ya5AJYoLpuU1JzMstQifbsErowz O3+yFrzjq9i9+ipbA+NGni5GDg4JAROJtV9yuxi5OIQEljJJ7P9xlBHC2cEo8b5zBnsXIydY 0bmL86ASGxkl1k88xwqSYBMwkvj2fiYLi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NJYDNvTUdtWbe3SfN/LVGG0nsta1hefvHWv6Ki xFKckWioxVxUnAgAqXI7wLwBAAA= MIME-Version: 1.0 Content-Type: text/plain 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)(39450400003)(39840400002)(39860400002)(39400400002)(39410400002)(39850400002)(2980300002)(438002)(199003)(189002)(9170700003)(5660300001)(356003)(8676002)(47776003)(2906002)(2950100002)(1076002)(5003940100001)(81166006)(106466001)(478600001)(77096006)(8936002)(4326008)(54906002)(53936002)(38730400002)(72206003)(36756003)(33646002)(76176999)(305945005)(86362001)(50986999)(50226002)(6666003)(189998001)(48376002)(50466002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR04MB0509; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT048; 1:CQigvDt/gMIuVltmwMfuSegX25QFFEKW/MIXi5hv4+S8zNlJ5jKeVEE5K88LWDLN2tnkZ/so2/TANq71bEbhWcY+/cmU38mjIVG9+uplpLxn3CGaTUgWFFdvKFaqeac7Ka9mOAg67Th50aBnAggWo1JmCUkCcdp0nhcH6pSmG6gthtPtzON3G4ljrAQ1jgOpo0ohAJ7A7Kh+6NJBt2MLw73mrloqiO62P6o7RzWH8AqHNTybZ6+CqWNJIChADc/WbprqvfzIEZuI3EuNQ1GKGmWcsxWSnRIi+kwH0UxDZ35tJWyXdP0x7yqqruVE7f+UuXJH7keUuiNek/yM6LaFmSANBUBr0n8Iu+ycj/JZQrnIS6O/x+X/GiZ65/lck+reRM8cYePUQM7Z7XNqMltnWkoRjQAY6E3lnmfhVOcSi0lnlsAY2Hift8K7/MSalWgkuItkd2mGpVLL66hilRKfZbN99M4NNC3952zTJtcTA9uCnVgQcMOy0Ow0jzFdehlkXcVoJZPJRctEQa4yJuf5RuaqK20ZjT2f0K4VF7eyhCM= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR04MB0509: X-MS-Office365-Filtering-Correlation-Id: 1665aeaa-317b-4c91-39b9-08d4a23ca33f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:DM5PR04MB0509; X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0509; 3:YBYb3YvkgrVSfwDI2vvWCdPhINPDf+g3fN/R+WwQlCiZV58PaTGtTlYyb45Y9IaCNzBwOP4eHPpEcLqUzjhyDj9FnMRQY0UyHlKrLfNftSqaKZJfd6M2EeJ9qiXjdFmDMyAW6WlFjlo7VM4lPeUuH6EGn09Ya7ryfYDBJmRoQd+Qs4RkRWuWU4G/utDrh0I1/4CQHrzXVIPDNolCaTM8cBybkz0eE8NuDLpEsPVSp+HXkjC12/5wIP+9tcETylwWGN5nCs8avWcfb+gOXoATJLTZPQfFAM41dwUcDxg7iK48p8abb9qdjx/Fnf2jxOvbopf2otyHT3osXJ9wc5l+iMKqzexTfwtY9YY45wbfI9AFImFR0bxqgJvE0yaCh55fUGE3B+N8XJLEoA5FTw6E4KycrwOg+zXN0Hzk/VOzqclzPPRg5lJrnsJpo6qBtjbevLF9BkYI5FH1251UVsoZH4hiOqdO2rmGNMqwMbcabJIzkol1pm52DzzN/eYelLgu X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0509; 25:oUXfWpvcfRH1UFIfUSQKilDATS6PoZdHEE0ip9I1AV5PXEsjFu5NvBQfpK1IoT0dJwWGOWuqAYxvcS6ukmu4o2O/nhT5eaEsIvufeIvA1yDOt+LhvzLfaLWbVPlTGJo1n98C1ttrjFqxZOw5k2GxUOxI4diSDbGlyLf/Ej8RmqRQBZVuEu0Do5kxTWC6x2g4zhtG/as/hofrmMOPjD/4JAOKjOU+pm9oYi1Nrk/bDl6upVcOuH/dvOEmvehlPD6RNz3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wwj/ahQ79uOo X-Microsoft-Antispam-PRVS: <DM5PR04MB0509D8C5FAAC18B676D0D55481FE0@DM5PR04MB0509.namprd04.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(42932892334569)(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13018025)(8121501046)(13016025)(5005006)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(20161123562025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(6072148); SRVR:DM5PR04MB0509; BCL:0; PCL:0; RULEID:; SRVR:DM5PR04MB0509; X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0509; 4:CD6ug49oQIqS06Du4N1d96L+pUg5A+Hkyg1DL42IjAXky+xpAglJ9KXSBEBX/mQC0zuY0D5hG9CYlAjQFOOILsqsC+/orZh+XhjdP+FFC55OB2e49qcOIcx0bWJhtNcC/jPNZ/F816WVSfIgZ5xFKwVUFIeupbZw0W6QmllXwfsu3bRWthvbFLBKS5Ou2CcxVWa7nEOkR1okScPICQ0FsUd2hqc5srZlKh5rS+JwJaR6nWy9zz3LVaFzj8oq1E2y01KtvzeihLVfOqOFWz3dnYzU0kST9Sd4rLKUIhc1p6OUq3wzUC4MXQgR8STT75OSm12yWnbqM32SKEN5T5HDY1Q2iwMZmromH+BREFUsAjvAeMPdB+ERbAY0icuhybKC58KVcptOBw08H4m2YjhOMsScTTLA25Qpc5lzG1OrAvyByoqBD/x9O2yptq1GLFqTs+4LW2w51J2IoqXIL/0eHXFRADUHFuz5jbWQG5VOxWQ8zYZw22s7OB3FNoBq4l6qITi29pEcrxFN0jn0pp52xzDPLUzVUbcPgbBOwkXTZMn/qqbk+YQaeFxi00/B2cofnoc6JOEuEiyCc+ibwu19+DJF8QQFDmebdCL5IPOYiWVtUCgVtyZnPdq19yRmYKGLL/4k5T+S1IAcL3FjcdZJftv1ULKOWDrqPGCbV+u1u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RplGPEQ63oO0ejMzRVrwYG1W6owHzgOTDZN/FgQ/nmi8czDuhrkUXhtKCa5rq6TuW7n30CaB5dj1IckHdX5HV2T6WZ8stv1y81NKmo=; 5:Xf9m74o+E6kUkcopFAn9f9mqZbThaGcDpDFX7nc6CEDAzeRcxpcxn9BI/nHrWfbwieISlb1GHqp5BoYohqoqT2k7wSUDbKTUue7G+UBpN9DZ/PZ2O3tZMwxx8x4C0N1CutwjVrw60qTiXagZYWEjCA==; 24:+H02m4KJO0pAg7SYOqNd2XtqCMc9Je7+SapMerj1rDrHRqBYDdF33kv3C/e26ebKiIfCvYub6iliygmBvttQUE5BzCTnrEJ6psQyCelMlpQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR04MB0509; 7:74onL+ULAcwwMJStxxjrLRJUAX0ixuYobz+NPlPJRQyrbVi5U81R+Y+Lp9nJ7t5f/vjmiHj9rTaXEvxwwe535Mq8fZwBzYnYyRQM/TatpQrfTBMSSxpWKf3v7mdmxD+GQmtg/TDB/NqA78Qzhdm8izq9+zg3pZlafaDZSUxMDKPhrer4684KwlTZMNYVpI36M6t1W7KvuINQMWG56ZWaT1p7wEOo/Mv+mPoWi70pp3XB8GDCYduX9o8tf74o9x4OxzuIUvkZ3Kji0tud5cr1LwSdk5uYAukmzWdh3R7dV8cBJhYSHmRTk9s2IkwOatuFkDAqdueGjsbmX9YdrRfTxA==; 20:JhiCg3fMtUq6BONufA7gJWqnN6d2rJ2WCgQJWRwc9G3bmgsp+/X1Peqa6arv4ivofPx7+X3+GuH5caLYrGJs3vqj9ooawNDLU77Vz2lELC2m6cCemh/IUJxgdZZAyZjelFXQv2nDeqC6LqNZayYcqdzjKDrzS9Uub0JMJ2n2/FE= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2017 00:34:28.3524 (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: DM5PR04MB0509 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: <linux-block.vger.kernel.org> X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
On 05/24/2017 02:34 AM, Bart Van Assche wrote: > Initialize struct scsi_cmnd.request from inside scsi_initialize_rq() > instead of every time a request is prepared. Note: moving the tag > initialization into scsi_initialize_rq() is not possible because > the single-queue block layer only assigns a tag to a request after > a request has been started. > > Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> > Reviewed-by: Christoph Hellwig <hch@lst.de> > Cc: Hannes Reinecke <hare@suse.com> > --- > drivers/scsi/scsi_error.c | 1 - > drivers/scsi/scsi_lib.c | 4 +--- > 2 files changed, 1 insertion(+), 4 deletions(-) > Reviewed-by: Hannes Reinecke <hare@suse.com> Cheers, Hannes
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 374dea0885f6..46c51f9f73fa 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -2293,7 +2293,6 @@ scsi_ioctl_reset(struct scsi_device *dev, int __user *arg) blk_rq_init(dev->request_queue, rq); scmd = (struct scsi_cmnd *)(rq + 1); - scmd->request = rq; scmd->cmnd = scsi_req(rq)->cmd; scmd->scsi_done = scsi_reset_provider_done_command; diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index f131964ecb51..612bf6c201dc 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1165,6 +1165,7 @@ static void scsi_initialize_rq(struct request *rq) cmd->req.sense = buf; cmd->sense_buffer = buf; cmd->prot_sdb = prot; + cmd->request = rq; INIT_DELAYED_WORK(&cmd->abort_work, scmd_eh_abort_handler); cmd->jiffies_at_alloc = jiffies; } @@ -1344,7 +1345,6 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req) } cmd->tag = req->tag; - cmd->request = req; cmd->prot_op = SCSI_PROT_NORMAL; ret = scsi_setup_cmnd(sdev, req); @@ -1866,8 +1866,6 @@ static int scsi_mq_prep_fn(struct request *req) req->special = cmd; - cmd->request = req; - cmd->tag = req->tag; cmd->prot_op = SCSI_PROT_NORMAL;