Message ID | 20170602212203.30401-7-bart.vanassche@sandisk.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show
Return-Path: <linux-scsi-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 22FEF60360 for <patchwork-linux-scsi@patchwork.kernel.org>; Fri, 2 Jun 2017 21:22:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1640D28590 for <patchwork-linux-scsi@patchwork.kernel.org>; Fri, 2 Jun 2017 21:22:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0AE11285D5; Fri, 2 Jun 2017 21:22: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 4CCF228590 for <patchwork-linux-scsi@patchwork.kernel.org>; Fri, 2 Jun 2017 21:22:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751202AbdFBVWW (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Fri, 2 Jun 2017 17:22:22 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:4274 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751157AbdFBVWR (ORCPT <rfc822; linux-scsi@vger.kernel.org>); Fri, 2 Jun 2017 17:22:17 -0400 X-IronPort-AV: E=Sophos;i="5.39,286,1493654400"; d="scan'208";a="119452964" Received: from mail-by2nam01lp0175.outbound.protection.outlook.com (HELO NAM01-BY2-obe.outbound.protection.outlook.com) ([216.32.181.175]) by ob1.hgst.iphmx.com with ESMTP; 03 Jun 2017 05:41:02 +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=emCfkdoVnqnVqbTsQFKIdQz3aTwkG+Jm1CJLONbAH74=; b=CoIXFJG+iSRPnkaQkmU0HXypJ4xgvsRnxBwcnfCM7Xdt+aZ/yqx/Eyhp9pkX81qvYWkHAlA9Z+Rd2MuXC88F7R7CpUybU1shrcUfmmTEqMlf75cNJyS6KTWAw4bPd01WJqrRi9Vq0MZD/IzJnWwYPhTO2Le+Avg+nXDaJ1+1QsA= Received: from BLUPR0401CA0003.namprd04.prod.outlook.com (10.162.114.141) by MWHPR04MB0415.namprd04.prod.outlook.com (10.173.48.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Fri, 2 Jun 2017 21:22:13 +0000 Received: from CO1NAM04FT058.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::202) by BLUPR0401CA0003.outlook.office365.com (2a01:111:e400:525a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10 via Frontend Transport; Fri, 2 Jun 2017 21:22:13 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; linux.vnet.ibm.com; dkim=none (message not signed) header.d=none;linux.vnet.ibm.com; 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 CO1NAM04FT058.mail.protection.outlook.com (10.152.91.93) 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; Fri, 2 Jun 2017 21:22:11 +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 17.7A.38445.107D1395; Fri, 2 Jun 2017 14:22:10 -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; Fri, 2 Jun 2017 14:22:06 -0700 X-AuditID: 0ac94371-422569800000962d-97-5931d701361f Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 1F.A4.18148.EF6D1395; Fri, 2 Jun 2017 14:22:06 -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>, Christoph Hellwig <hch@lst.de>, "Bart Van Assche" <bart.vanassche@sandisk.com>, Israel Rukshin <israelr@mellanox.com>, Max Gurtovoy <maxg@mellanox.com>, Benjamin Block <bblock@linux.vnet.ibm.com> Subject: [PATCH v3 06/12] Make __scsi_remove_device go straight from BLOCKED to DEL Date: Fri, 2 Jun 2017 14:21:57 -0700 Message-ID: <20170602212203.30401-7-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170602212203.30401-1-bart.vanassche@sandisk.com> References: <20170602212203.30401-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPLMWRmVeSWpSXmKPExsXCddJ5kS7TdcNIg569HBZfbl5htli5+iiT xY3Fa1ksNvZzWHRf38Fmsfz4PyaL048OsDuwe0ybd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SiWm5lTnJueWWBopFecmJeSWZytl5yfu4kRHD6cUTsYr080P8TIxMEp1cA4UabA RbGqQmzd7lu9PNWy8yZvquv58+jJNYabfzZE8bg0eC5Vanq53vLD2r9y9xdtarC4e9eYp7Yw 1lWOycQkp2C7pq6jqdD78ozstKAnH16v9TNIKdTdsD5g3ZSFCQoB739xfQhetOHeCa2FGjtV 3r7l6FtUuVmZ85eI+LXkYzdqpBpKPS8rsRRnJBpqMRcVJwIA4oprn88BAAA= 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.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39450400003)(39860400002)(39840400002)(39850400002)(39400400002)(39410400002)(2980300002)(438002)(199003)(189002)(9170700003)(5003940100001)(4326008)(48376002)(5660300001)(189998001)(33646002)(38730400002)(53936002)(54906002)(72206003)(86362001)(15650500001)(2950100002)(356003)(36756003)(1076002)(8676002)(81166006)(50226002)(8936002)(76176999)(50986999)(50466002)(478600001)(47776003)(6666003)(77096006)(106466001)(305945005)(2906002); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR04MB0415; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT058; 1:8Nzy38g9YuBo7mNuc6M7uTtd/wMJkXcFPx2H7ACp/R+2FurgBHv98StWrS67pHO8FsgxyjSiCsqosGQSO88e4Yihcr7uS/VI8NpoDHr+eHqgG5QaOxq11zvN8L8h52y+7SX0t4QJ0JgmgAffoxm+wIxRq3HYO8Pvz01RZhFHwskpTYSKakXcH+zf6AvXFXPt9EHK4V0PJJi3mcD3qiCf5eyjqmZJT+JKv3OYm6d7j15u/a4XjevISIhcYPR5kATPYa0t6rt45rgBvag+kpLChrrqg0fO8qCB2o5WVIe8v8/mVe+JFHXjvGt1cYw990yNwXcC1iRqxpYy9dv/Yu02eUmInMp8QntA7PvCxmLEzcjkIHP8MlXXIQR76fYFK8+2eotl37uBc6dOt5hFSeMLssoKd+gnoZEchf3hJ9I35FDBwF9Mc7oLKIW42KGfUJhyLpxdNBwKK7/0AIAtndTFOobPhLzCBOvv76Q2+Ug7DBxOgvsnzLJ32jSXCgkpGDarrQKw6FCUE4lcg9VHq5USLKvdvl2M13ssHQeYayLU/nIcnkzhFMNVvwi4ToQM9e8mSMZFmXsQES8ESZjvh2PH/A== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR04MB0415: X-MS-Office365-Filtering-Correlation-Id: dfd22ffe-f744-4d3c-5923-08d4a9fd6f75 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:MWHPR04MB0415; X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0415; 3:Yc6wfa1hCOa8uQpCGg1elpLJ63ry2POqzoajxh97f1bUNXO6rjI7vthOKGDuHPfqRAUlJLK6FYjo8YmywCUA5ltdmPtYQWllEkPno7XKH7JWxTxpWeX3zNFapKBsxCGmhn3ZS1iqmpVl2G2KNR2tMya2jPtetYT7Ugw/sHpEYYRh6eeGTBq44QnUGmcS8AA1UK5eu4ccsPlCxZuKEg53hDCmXEvH4lGKZ8xTYpQi06F3Kn7VEdqPdeUkqD6dQWzLjShFbLagXRS1OKjzMEc8PucXykB46D5re/Lq+/AEJzcILW1io+H4/8SHH3plrxjfPNEyLzjsHlVo3rf/SQCKimRP/73VGYKz0NumD9NnEFF/c26SJt9nqdL5wIn4vXCfHmAe5z/wsQukSjJXvfSLUuhEQ8cZ9M63/pGwHMOnF9mQ6h3xA2oBp3FDpjjtundBhoNBcfzVoTnB180hVxh+5A/RVTMmGojSRlq2gyDwOmU/tsRzsN8ujyHOOoTcCEBY X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0415; 25:7vbZHlngpa9iBsoHJ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RMJ0O3ylBF4lt4jSwhNlYn1J5kcfTDKp7S+HwQrNjwnITWTCHY200/mG9NVj/YENI3uMjz8/0qJqZRAGVKfWXbjZn4oCWbPWER2YbfMyMbWHlNmAX8k6BFi/HTo3Jm60Xph1WvTMBsVvXlrMigKr4+13lsrDgoyOXUy4BbFX1m5BR6JEALcwKjfeaY/GqabRr176UU6xQeeaGmNxugisTBPZ1uavDkuV8XzfZ/EnzDsipSiRAgv+mMyidVf+obrRIY7m X-Microsoft-Antispam-PRVS: <MWHPR04MB04153E937DB9CC013BA0A18281F70@MWHPR04MB0415.namprd04.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(104084551191319)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13018025)(8121501046)(5005006)(13016025)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93004095)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(20161123564025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR04MB0415; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR04MB0415; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR04MB0415; 4:4/Tj0RPuVxIl7i98vCKyT/tVveSXX1+fn1NN5OOFzg?= =?us-ascii?Q?8sKnG7ymMh71tRpHSIfbaONYB87Znz7tgzg3KegWDETQUFglQ6R84H+cMjTO?= =?us-ascii?Q?l8Dp0AA3jOGHns1LEy/U7xHZ3EeGcFl/ERfxsdiupYmwZGZU8sVwCYNpTIBs?= =?us-ascii?Q?dtvTlDdtLu7WI0EDug07Wr/GCTy3NLymTvqrMimmy/KCDAepVISseGz6G8hX?= =?us-ascii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7WKFC6e2DFM?= =?us-ascii?Q?K7+6G+2UFaFJTKJMzM8Int6HToNvg5Q3Lx2YNVzR1sjSd8XEPoaBNK74AKT9?= =?us-ascii?Q?WYa9/iOPyCGfXcNEfaa1ejE3vAPcPfra2gxPKwrBGc1/NQw/h4faacYTtofy?= =?us-ascii?Q?Ww6SyvXu/cFwWzedTwaXTiLNELoFFvebfNO48a54rGLnJ339w+n/U4EslJXQ?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 03264AEA72 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR04MB0415; 23:6Y9n9uNJM9Qjyt3jtZPe2/xLxEE5aKbJyEhbG9WtD?= =?us-ascii?Q?svqwR9s3HjuJnFblw3rkXIUtJVVJi4SBnAzpC78ViAh0ltTXTphdmDACKiO4?= =?us-ascii?Q?I2gwGZSFwVqb/z16xFMq+opOJDLth1hCWdGmvPo9nZYTz+LSBeUJTkAeI0LX?= =?us-ascii?Q?lU8OYfjff46i2SSBXiocaoFroUyUn7d4QJlBmRzfvyZOWb5ECKq9sIEV15Xf?= =?us-ascii?Q?Z9VNOu9nOHfVfGELtuf8Nkm7TvsvYgd3J+RSAcprblCVq+rHfftMrO1Agfxy?= =?us-ascii?Q?FuM/mHu7oIw/sjM44TSerN7TsZcaKwRIUXdw/o7PHHsQqRYv6CgSL30vT1oq?= =?us-ascii?Q?neDwizc/aVkNbs9sIoxbprxlglgNZ2vUoS55VRWTzo70TlE4cbxS5BeHmiMf?= =?us-ascii?Q?XXFGWr/KDgQgdoQ69sVbIeswnNdWs2+10n87snzpfTWhPcoUopOpvCReDXzO?= =?us-ascii?Q?bmxWWmJStChKWg9xgAgTqZDbgOT5Nvhw6nUYkW047mSaU3gZSeRA3jrJU3n4?= =?us-ascii?Q?VsetkY6kR2JYgfn6vFV2ZgF/IxlX9wJt/eOhSyexwcOPRKl91+0BLQKA5UVJ?= =?us-ascii?Q?5VZGi0YXCFtaT2sbPiTV+U+DGAgBAAp4tdW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D4EeCsgQ6X26VGh8uVLGglMx+Sl1ZXj+wxbMfmeKapMzqOPdMkMDIh3PAZG+3lkVeq+cTVvTkjvAKhDRgR05L/P7NNIR07KMCDXX3cR8ObBm7sANasFRIG6ypjg==; 20:t5A/5vnS5GkSRhXKhk0L8IYdu27hxQa5uayczBzY8DIzAXtMksa+eRXzsfMWRpA7XdOpBSkvtJNfbzVyeLC/5Es0766PXGqwHqzWudmSTse3060IWLhzxYQrEZNE6cHxMISGD3f8GRCR2EGZ91SNdX6W3PgT06+RSu8RVthR5pY= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2017 21:22:11.7707 (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: MWHPR04MB0415 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 6a58a124714f..8665eccd2fc8 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -2624,7 +2624,6 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) case SDEV_QUIESCE: case SDEV_OFFLINE: case SDEV_TRANSPORT_OFFLINE: - case SDEV_BLOCK: break; default: goto illegal; @@ -2638,6 +2637,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) case SDEV_OFFLINE: case SDEV_TRANSPORT_OFFLINE: case SDEV_CANCEL: + case SDEV_BLOCK: case SDEV_CREATED_BLOCK: break; default: diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index a91537a3abbf..ce470f62a8ae 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -1290,7 +1290,17 @@ void __scsi_remove_device(struct scsi_device *sdev) * wait until it has finished before changing the device state. */ mutex_lock(&sdev->state_mutex); + /* + * If blocked, we go straight to DEL and restart the queue so + * any commands issued during driver shutdown (like sync + * cache) are errored immediately. + */ res = scsi_device_set_state(sdev, SDEV_CANCEL); + if (res != 0) { + res = scsi_device_set_state(sdev, SDEV_DEL); + if (res == 0) + scsi_start_queue(sdev); + } mutex_unlock(&sdev->state_mutex); if (res != 0)