From patchwork Mon Oct 2 02:30:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 820345 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3y55rv6hStz9t42 for ; Mon, 2 Oct 2017 13:36:31 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752483AbdJBCgJ (ORCPT ); Sun, 1 Oct 2017 22:36:09 -0400 Received: from a2nlsmtp01-03.prod.iad2.secureserver.net ([198.71.225.37]:53470 "EHLO a2nlsmtp01-03.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751702AbdJBCbz (ORCPT ); Sun, 1 Oct 2017 22:31:55 -0400 Received: from linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id yqVHdeTuiHQ4gyqVHdXggi; Sun, 01 Oct 2017 19:30:53 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv.com with local (Exim 4.89) (envelope-from ) id 1dyqVH-0000xE-Il; Sun, 01 Oct 2017 19:30:43 -0700 From: Long Li To: Steve French , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Christoph Hellwig , Tom Talpey , Matthew Wilcox Cc: Long Li Subject: [Patch v4 08/22] CIFS: SMBD: Upper layer reconnects to SMBDirect session Date: Sun, 1 Oct 2017 19:30:16 -0700 Message-Id: <20171002023030.3582-9-longli@exchange.microsoft.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171002023030.3582-1-longli@exchange.microsoft.com> References: <20171002023030.3582-1-longli@exchange.microsoft.com> X-CMAE-Envelope: MS4wfChufiweeUbp9ATOic+IepjtJ80CCbiyrTZS2VS94Rl1Ll7wJjwh01ay8VLTIiWFQ1MUIKOQsRUiEN1arAwe3r4KqJnzmSPOLg25gPOmjOpv6u/sUPhF +OBpyAnMIq2SlRbZAsbNHf+94stmzq/zlCKu8mbAO32g7WkVQZBjc42g3MijZAl07JsJ4pzy0yRHVm8E0/g8Q1RRvYaj9gPOlFMC3PQbN/YR/RVNWYATWXWI 1bYwj/zS1SwAlQLMNnrN3Iv2GEP+KL68GL5JcMMr4tmGCzNmGwLBFcNOprPujl/hsz23AhuyAWAnwh6g5can52/GL4qH57q1XMuTp/Udp/QCdxyc17xp2J+G SerQSXCrd3OLPB2OhJj11JWvyDj5Ofiyh4C7kRMnIUTB7gV8bB9TvRZLVpEvvyzI/ztAFE22uPqoKAsqC4IHJ0J57RB9qEM7gwArwdD+a2ws76jM8p5TlJLB EnSOzrD4wKnHVdkh Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org From: Long Li Do a reconnect on SMBDirect when it is used as the connection. Reconnect can happen for many reasons and it's mostly the decision of upper layer SMB2. Signed-off-by: Long Li --- fs/cifs/connect.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 94b6357..26ad706 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -405,7 +405,11 @@ cifs_reconnect(struct TCP_Server_Info *server) /* we should try only the port we connected to before */ mutex_lock(&server->srv_mutex); - rc = generic_ip_connect(server); + if (server->rdma) + rc = smbd_reconnect(server); + else + rc = generic_ip_connect(server); + if (rc) { cifs_dbg(FYI, "reconnect error %d\n", rc); mutex_unlock(&server->srv_mutex);