Message ID | 5541EED1.8020702@sandisk.com (mailing list archive) |
---|---|
State | Rejected |
Headers | show
Return-Path: <linux-rdma-owner@kernel.org> X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1C0949F326 for <patchwork-linux-rdma@patchwork.kernel.org>; Thu, 30 Apr 2015 09:14:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 48783201E4 for <patchwork-linux-rdma@patchwork.kernel.org>; Thu, 30 Apr 2015 09:14:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 68EA7201CD for <patchwork-linux-rdma@patchwork.kernel.org>; Thu, 30 Apr 2015 09:14:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751223AbbD3JOI (ORCPT <rfc822;patchwork-linux-rdma@patchwork.kernel.org>); Thu, 30 Apr 2015 05:14:08 -0400 Received: from mail-bl2on0069.outbound.protection.outlook.com ([65.55.169.69]:44234 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751095AbbD3JOG (ORCPT <rfc822;linux-rdma@vger.kernel.org>); Thu, 30 Apr 2015 05:14:06 -0400 Received: from BY2PR02CA0034.namprd02.prod.outlook.com (10.141.216.24) by BY1PR0201MB1030.namprd02.prod.outlook.com (25.161.203.148) with Microsoft SMTP Server (TLS) id 15.1.148.16; Thu, 30 Apr 2015 08:59:00 +0000 Received: from BY2FFO11FD048.protection.gbl (2a01:111:f400:7c0c::119) by BY2PR02CA0034.outlook.office365.com (2a01:111:e400:2c40::24) with Microsoft SMTP Server (TLS) id 15.1.154.19 via Frontend Transport; Thu, 30 Apr 2015 08:59:00 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.173) smtp.mailfrom=sandisk.com; redhat.com; dkim=none (message not signed) header.d=none; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.173 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.173; helo=milsmgep12.sandisk.com; Received: from milsmgep12.sandisk.com (63.163.107.173) by BY2FFO11FD048.mail.protection.outlook.com (10.1.15.176) with Microsoft SMTP Server id 15.1.160.8 via Frontend Transport; Thu, 30 Apr 2015 08:58:59 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com ( [172.22.12.162]) by milsmgep12.sandisk.com (Symantec Messaging Gateway) with SMTP id 75.2A.14695.3DEE1455; Thu, 30 Apr 2015 01:58:59 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.224.2; Thu, 30 Apr 2015 01:58:59 -0700 X-AuditID: ac160a69-f79656d000003967-9f-5541eed3eb5c Received: from [10.50.231.61] ( [10.177.8.100]) by milsmgip11.sandisk.com (Symantec Messaging Gateway) with SMTP id B4.EC.19112.1DEE1455; Thu, 30 Apr 2015 01:58:59 -0700 (PDT) Message-ID: <5541EED1.8020702@sandisk.com> Date: Thu, 30 Apr 2015 10:58:57 +0200 From: Bart Van Assche <bart.vanassche@sandisk.com> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Doug Ledford <dledford@redhat.com> CC: James Bottomley <jbottomley@odin.com>, Sagi Grimberg <sagig@mellanox.com>, Sebastian Parschauer <sebastian.riemer@profitbricks.com>, linux-rdma <linux-rdma@vger.kernel.org>, "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org> Subject: [PATCH 05/12] IB/srp: Fix reconnection failure handling References: <5541EE21.3050809@sandisk.com> In-Reply-To: <5541EE21.3050809@sandisk.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding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kftx9D1bEIqAq8e7bMzCbTcBI4tv7mWC2qECYxLTfz1kh6gUlTs58AhYX EVCT2PRqETvIUGaBr4wSM67vZwRJCAs4SKyc+hNsgRDQggubroPFOQW0Jc51tIINYhZQl/gz 7xIzhC0vsf3tHOYJjPyzkOyYhaRsFpKyBYzMqxjFcjNzinPTMwsMDfWKE/NSMouz9ZLzczcx gkOYM3IH49OJ5ocYmTg4pRoY96kynzj46dC66Vk1/lPYLrpIH5MImvneSGy5dEda7YxPtUbi obFPalP2y9lliv+PFTSJuxrDGuRT73Q28PTvOcXld7dwLeSJlBJXDH6/gX/Pld4Ph5eV3Hki r1uzL2KJbcXkY9Lbbq5UnZyS+/e7UoXn2vKlrcUvja/fF9mUWVPwltFm/YROJZbijERDLeai 4kQATDRlghECAAA= X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:63.163.107.173; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(438002)(189002)(199003)(54356999)(65956001)(106466001)(87936001)(65806001)(36756003)(92566002)(64126003)(77096005)(87266999)(47776003)(77156002)(59896002)(110136002)(62966003)(83506001)(229853001)(50466002)(23676002)(19580395003)(19580405001)(65816999)(50986999)(46102003)(33656002)(4001350100001)(2950100001)(80316001)(76176999)(5001960100002)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0201MB1030; H:milsmgep12.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0201MB1030; X-Microsoft-Antispam-PRVS: <BY1PR0201MB1030A04C107184E4D467C99381D60@BY1PR0201MB1030.namprd02.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:BY1PR0201MB1030; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0201MB1030; X-Forefront-PRVS: 056297E276 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2015 08:58:59.9058 (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.173]; Helo=[milsmgep12.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0201MB1030 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: <linux-rdma.vger.kernel.org> X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 0eb07d3..5d7d790 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1246,11 +1246,8 @@ static int srp_rport_reconnect(struct srp_rport *rport) } for (i = 0; i < target->ch_count; i++) { ch = &target->ch[i]; - if (ret || !ch->target) { - if (i > 1) - ret = 0; + if (ret) break; - } ret = srp_connect_ch(ch, multich); multich = true; }
Although it is possible to let SRP I/O continue if a reconnect results in a reduction of the number of channels, the current code does not handle this scenario correctly. Instead of making the reconnect code more complex, consider this as a reconnection failure. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Sagi Grimberg <sagig@mellanox.com> Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com> Cc: <stable@vger.kernel.org> #v3.19 --- drivers/infiniband/ulp/srp/ib_srp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)