From patchwork Thu Feb 2 00:58:43 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: 9550937 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 883AC60236 for ; Thu, 2 Feb 2017 00:59:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 741E72844A for ; Thu, 2 Feb 2017 00:59:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 68FA12845B; Thu, 2 Feb 2017 00:59:37 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 048C42844A for ; Thu, 2 Feb 2017 00:59:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751415AbdBBA7g (ORCPT ); Wed, 1 Feb 2017 19:59:36 -0500 Received: from mail-bn3nam01on0059.outbound.protection.outlook.com ([104.47.33.59]:41792 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751373AbdBBA7V (ORCPT ); Wed, 1 Feb 2017 19:59:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=VdwHElHbGEBI61dK9DV+KLCDbyOJZ/nm0cE8Cg6G7dE=; b=X4GFty5hm7F2yCFNvf5oyP9yBzpGKmmCI3uV48SXfM1TqBUqRn2Rk5B2BUlOdKMHi7kwP6jvrt8bGTZg/sZ7eYqvE/uI3kVix6jRlP3sB/z9pDeIBe4hB5jNWjNZb19Bpd+Z8YysSLMvNAoAMqD9H8vcfpowVXNBugmWgSVfPHM= Received: from BY1PR0201CA0031.namprd02.prod.outlook.com (10.160.191.169) by BLUPR02MB036.namprd02.prod.outlook.com (10.242.191.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12; Thu, 2 Feb 2017 00:59:04 +0000 Received: from BY2FFO11FD011.protection.gbl (2a01:111:f400:7c0c::183) by BY1PR0201CA0031.outlook.office365.com (2a01:111:e400:4814::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12 via Frontend Transport; Thu, 2 Feb 2017 00:59:04 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.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 BY2FFO11FD011.mail.protection.outlook.com (10.1.14.129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.2 via Frontend Transport; Thu, 2 Feb 2017 00:59:04 +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 5D.7C.65426.37182985; Wed, 1 Feb 2017 16:46:44 -0800 (PST) Received: from milsmgip11.sandisk.com (10.177.9.6) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Wed, 1 Feb 2017 16:58:57 -0800 X-AuditID: 0ac94369-b62949800001ff92-3b-589281736d88 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id D2.73.16817.15482985; Wed, 1 Feb 2017 16:58:57 -0800 (PST) From: Bart Van Assche To: Bart Van Assche CC: , Christoph Hellwig , "Andy Grover" , David Disseldorp Subject: [PATCH v2 26/36] target: Simplify LUN RESET implementation Date: Wed, 1 Feb 2017 16:58:43 -0800 Message-ID: <20170202005853.23456-27-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170202005853.23456-1-bart.vanassche@sandisk.com> References: <20170202005853.23456-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrGLMWRmVeSWpSXmKPExsXCddJ5kW5J46QIgwXvWS32z3rGZPH1/3QW i5WrjzJZtC59y+TA4rH7ZgObx/t9V9k8Np+u9vi8SS6AJYrLJiU1J7MstUjfLoEro+vtIvaC 09wVnz+cYm1gfMjZxcjJISFgInF54U7mLkYuDiGBpUwSf1ZcZINwtjJKtJxvY4eputq/Fqpq M6PEtu42JpAEm4CRxLf3M1lAbBEBA4nfvRcYQYqYBToYJeb3PGPtYuTgEBZwlmi6WABSwyKg IvFz5VJmEJtXwEFi4cY3zBAL5CV2tV1kBbE5geKLj0PMFBKwl/j25ygLyEwJgS5WiSkvG1gg mgUlTs58AmYzC0hIHHzxghmiQV3i5JL5TBMYhWYhKZuFpGwBI9MqRrHczJzi3PTUAkNTveLE vJTM4my95PzcTYyQ0M7cwXj3ifchRgEORiUeXgGRSRFCrIllxZW5hxglOJiVRHh9gZEhxJuS WFmVWpQfX1Sak1p8iFGag0VJnPfVq/4IIYH0xJLU7NTUgtQimCwTB6dUA2M484WgjbqKbsnZ Ov/Xrp9a9GCz0N8TfseEJk0PWv46PfzhMiUOF8/z9R5hn1o3mxjpPcmzm3PzZd1/+bmRCj/3 R6e+nVjMNrXq+6aY9PMrytwsVq+cWdlldDzgxI8HaUs9/191EJli/kzbZtuh3oo8W8PslJ3N fLX3Ff6on4pZzznz+dbI92FKLMUZiYZazEXFiQBy3JEMaQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKJMWRmVeSWpSXmKPExsXCtZEjRTewZVKEwZ/pchb7Zz1jsjj4s43R 4uv/6SwWK1cfZbJoXfqWyYHVY/fNBjaP9/uusnlMW3OeyWPz6WqPz5vkAlijuGxSUnMyy1KL 9O0SuDK63i5iLzjNXfH5wynWBsaHnF2MnBwSAiYSV/vXMncxcnEICWxklPh7ZREjSIJNwEji 2/uZLCC2iICBxO/eC4wgRcwCXYwSm86cYu9i5OAQFnCWaLpYAFLDIqAq0TF7OiuIzSvgIPH0 xn0WiAXyErvaLoLFOYHii49DzBQSsJf49ucoywRG7gWMDKsYxXIzc4pz0zMLDA31ihPzUjKL s/WS83M3MYIDgjNyB+PTieaHGJk4OKUaGOMY3T+cnMNs/lRt3oeTZnLK6w4I1m/k5+vluqjy 8YPEe7ZlUxmTRTXS2V+/Lo+oDi9zuCR79X7oDbng8g1Hw6bc5jsWvejKe9ebIu8Zv+kp3psU cfPE8jPOjnM4H/vbPVErfWfy9H7vud6TEScPcOj1i2ZF2jssa7/94ncL69bPT+bN/mketUiJ pTgj0VCLuag4EQCbSuHpuAEAAA== 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:(10009020)(6009001)(7916002)(39850400002)(39860400002)(39410400002)(39840400002)(39450400003)(2980300002)(438002)(189002)(199003)(110136003)(1076002)(50986999)(76176999)(106466001)(5003940100001)(81166006)(81156014)(2950100002)(305945005)(53936002)(8676002)(189998001)(6666003)(356003)(47776003)(2270400002)(1691005)(48376002)(50466002)(69596002)(33646002)(7049001)(92566002)(6862003)(36756003)(6200100001)(77096006)(97736004)(86362001)(8936002)(5660300001)(38730400001)(2906002)(68736007)(4326007)(50226002)(626004)(54906002)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR02MB036; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD011; 1:3C5MAWY5oKtfHSiyeC8MQPgBFLmQ1PdxOg8ohwuttSu8LVTgE8logUP32OAIJadiKA1CravR6Kc5uOTzc6bmsRxJLxCCnv2jgYAaYqtSzwh6KRFjdoOPTgCHzMoCxldu4tW85rnI0jNNld5Q8V3KQD/HXZrTt24a3uCtHIvfF/WwrpLIW65Ah7ixkcOrp3PaNL9jb9uDgc3izDad1UVti3yH++R9XdXQ3bCoUGL1K6lZc54tIxu7Rt3jwci0N9yTUcVuUb7WrXKcBidiG5d8DRJtgZlZzjc8EJe4He1nmqzUwujthrpVmMGQL7SXGwFubzkNOkZX9LeFnrWcPyfh60WTI9BSoxtWtDiTB6naJIhhmREK1NK+sToEi7X//kDy5kfGyzfzRwA9J2Qs2HrDGeaFBQKlXzCZEZYzmVtRrgomQCqbQ71+R2aY6RLAh+KuvxE9S/2uTV/7swKKMzSLPLizYCa8Rdfjy3RN16+0DIWI330E1GQ/raqyUliLXI8f X-MS-Office365-Filtering-Correlation-Id: dfc28e18-7453-4078-1ef9-08d44b06aecf X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:BLUPR02MB036; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB036; 3:xwKHYGi61/dWOaETC8sCnnT8RNUt8PevafOK23LBThoY9qmUhU2QlJUtfPF8+iefUtJDkIsdhChLGrfumIb3tPMAt8GHFf/dnju/adRTDBOIn0GuhhsrmR9ZpbPFOdsmZkYvBp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ONjEAGwXLczs=; 20:euZvbx4Qg/Ka/T1vB53dWUP/c7VD4fJxDbolRxrNDZOSJzQeCM78JhwV7fbiGs/5hGU0BQcxcT0UnDsG01kRfM/fng/vpMU8B+klnKUMnlRzcMdaHuoz2KvDG9KI4k7uZjLOGEfZYUmzAJnvOyDPz0b2XVFuWrrITg1M2zRygpwQQViGnplteyIkFMBrH7EPbrEofVgr/l+mRhprnbiEydfrKimFuwuSV47FZ5UWbSGpC0doInR4+qzFlItJklFN5c9mljr7b9p3qdYXXovyfVch7nBsbck2xlhSiPAtyZby/hKgDk63hvRTHwWcIiT64k1dAcsOT4Z9eppRttHv6ouuVgGO0B7X+LVH9Kt/VCIta7qQ2U9CATriCqVMCa3hDoydAFDiKiAAuDFEoL6dVFLBVNdJJ4YmvJg40VEv1GSR4vhNSCR45ZiJ6hkKvUZZCZxoeZWAlK65sWaJCKKQBMXYEct7hMWBoqRR0F6HfpCx/aMwohlQ4K2rGg6zWRNA X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13018025)(8121501046)(5005006)(13016025)(10201501046)(3002001)(6055026)(6041248)(20161123558025)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(6072148); SRVR:BLUPR02MB036; BCL:0; PCL:0; RULEID:; SRVR:BLUPR02MB036; X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB036; 4:/OPPzMvOFne2e3rlR7027LkZruqCA4Ewl2ybuXxS/6X6wV4InmNly7Bi1JEmU8uXUj0Zy2goNK7oZ303bXx/Q8Q5eABw96R2sa4lw+kdpNS8oIhTtCEHs8NZSiaYXW9349IY6Xa4Ly7nqk73WDXSwJx0EqxmPBqjSHWb3qcUH/xj9JnTDSjWTVkg2uTM2tjBRw1YYgHx2BxhniDiMdO1GYgC26X4GAj808Pu2mwsIzC1OtOHn8H5vYoSusX3VXu/hLdiALs16R/XWy9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rSKHSuKX8?= =?us-ascii?Q?cxbOb2Jx9hvfm4duHeFKMAqO1NU5LNpUTma+oleVsexjAJnlNMcmJ0seHU1g?= =?us-ascii?Q?eBGOf5APsoIjPjXXUEFu0YkaIFdaQlHr+JtvwQJSNP7rbUPqOsfM9iVj5sDE?= =?us-ascii?Q?Gq1rNFiUcIkcxT5xWWNQmmLF/zeLIa47QuDX+Ta+QGf36wbLGDc2LNZTf68J?= =?us-ascii?Q?tPklP+wpExiGr+DtIXMadSt+6uZmkoYFZqA6SDnqnwy9vtyCtUfcQMCi+ZWM?= =?us-ascii?Q?+s5uk7lk0dwMEFglyhrFGnsJOe7YlRq5A02GP81gtrBniZEoKrRjD6lc6YCO?= =?us-ascii?Q?IWvNesRFNtEdy3xIBthNWwPqUETVzJLheZjeo0ZzoLGfnGMdPMBmXkHVrhmR?= =?us-ascii?Q?2Nky++E1dX5CcKS+Ek5whTimvoh+5IlYfpcuhCou2y4eDFVjyN32Oo3vatqN?= =?us-ascii?Q?4VBsbgoyokoI8ouz8KNpiCnYjVdYC61wmb2amAJ3DL55QlnfEAgRBbYlCUnM?= =?us-ascii?Q?6hwhvgfv1Uv2Ra59AQ4ju3RTZsTJ6LCnlUkiC4BexK4dtzikIGwZPT2wrApF?= =?us-ascii?Q?P1b+St1NInsb77Z1c72iGniW/2/PZHDyieh62JKFSXghfgxTeVD+3+JpNdpg?= =?us-ascii?Q?mT/mQWrpveWISk5tnTdAnydaq8Enrc3/E6nRo3xntHIHVJGdLDLZ459U8W1r?= =?us-ascii?Q?/5YfrePXZz4TQDL9yBTeVWWFd+GvhkwYv9wEC7w8qScZjhHwIwy4Jv4WA4+b?= =?us-ascii?Q?H0WUwNlx2/u4pvF8nXk22lBNxppYZpGvyiheAa0+50STVO8VmQ5LYY6ff56D?= =?us-ascii?Q?zaK1omb3aAyCBrBEM=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR02MB036; 6:guKttr0nKMkOWWB10hAH7kApTHDJ3GnD74kESElo8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4cEyyTHRpPFz3jvHX/dNOhdQcbo9F23fC2E2Q/7mYLNxIbpPcW6cDMoZXOsnz/bDfw9rCX1n37m5F8zv0AzjbS/kOqURCTl87lAxGQWQVl1i0v2/AfcyTH65goNN6sHrVNsKMmXblrga6A6iu+zWM9I1XCOFUHQrC4/f27QOhAjzI0yjynZbCLh1V1l6f/iGb86p8S8CDG2e8o5GQkMif73SsUTl+v59d6Hkx06s1re518z3bX4OlEqgtn/2iJ5B X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2017 00:59:04.0466 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR02MB036 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Due to the task management handling rework it is safe to wait for a TMF that is not in the active state. Hence remove the CMD_T_ACTIVE test from core_tmr_drain_tmr_list(). Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp --- drivers/target/target_core_tmr.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c index 75527c83a860..fa74518c1ad1 100644 --- a/drivers/target/target_core_tmr.c +++ b/drivers/target/target_core_tmr.c @@ -228,22 +228,13 @@ static void core_tmr_drain_tmr_list( continue; spin_lock(&sess->sess_cmd_lock); - spin_lock(&cmd->t_state_lock); - if (!(cmd->transport_state & CMD_T_ACTIVE)) { - spin_unlock(&cmd->t_state_lock); - spin_unlock(&sess->sess_cmd_lock); - continue; - } - cmd->transport_state |= CMD_T_ABORTED; - spin_unlock(&cmd->t_state_lock); + rc = __target_check_io_state(cmd, sess, 0); + spin_unlock(&sess->sess_cmd_lock); - rc = kref_get_unless_zero(&cmd->cmd_kref); if (!rc) { printk("LUN_RESET TMR: non-zero kref_get_unless_zero\n"); - spin_unlock(&sess->sess_cmd_lock); continue; } - spin_unlock(&sess->sess_cmd_lock); list_move_tail(&tmr_p->tmr_list, &drain_tmr_list); }