From patchwork Sun Aug 20 19:04:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 9911397 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 269FB603F3 for ; Sun, 20 Aug 2017 19:10:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16D9C28710 for ; Sun, 20 Aug 2017 19:10:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BC4428751; Sun, 20 Aug 2017 19:10:41 +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,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 92F8328758 for ; Sun, 20 Aug 2017 19:10:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753714AbdHTTJv (ORCPT ); Sun, 20 Aug 2017 15:09:51 -0400 Received: from a2nlsmtp01-04.prod.iad2.secureserver.net ([198.71.225.38]:41826 "EHLO a2nlsmtp01-04.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753512AbdHTTG1 (ORCPT ); Sun, 20 Aug 2017 15:06:27 -0400 Received: from linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id jVXJd9x8AggvVjVXJdRQfK; Sun, 20 Aug 2017 12:05:25 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv.com with local (Exim 4.89) (envelope-from ) id 1djVXJ-0000oI-Rw; Sun, 20 Aug 2017 12:05:25 -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 v2 06/19] CIFS: SMBD: Reconnect to SMBDirect session Date: Sun, 20 Aug 2017 12:04:30 -0700 Message-Id: <1503255883-3041-7-git-send-email-longli@exchange.microsoft.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1503255883-3041-1-git-send-email-longli@exchange.microsoft.com> References: <1503255883-3041-1-git-send-email-longli@exchange.microsoft.com> X-CMAE-Envelope: MS4wfOV1ygbtq8gWlsn8loHvnuOGWquq8FFySgCGMl8vpZDj2v1vi0YK3mthxT+FEjueWlon0kQ18eQtkvxUsLMlC7xMd2H1FePfBX/OOZrIvb/G+QKLK43E 1k4totClx3/o0mmK0w70rCuV10WwL1b9L4CevhZnQwiKnT9eP58Gv5Yg8oULzIpveGibvHI9xnUhxHUhPeRBExhfxSEgoWpuNsJdw4Oyh5KO9Zq7NKfeUCQe HJ9Hovmjfqu2Up5nViQd4YTuJqn6WEUKjRth1cQWbklnvJ1e1R0MGUuuKRDiq1JvEKUUTyMnej2UnEzuEXn0vrWhJfUJ9J4kZrs3wba6Tza4gDEmmNuaaqxb jfytTAWuVyT70M1vVEdXRoCc2YVGNVt3aLSz5Vz0X+mkzE9WilnMvB/gqtz38gQJ1Gk/IY0gNL1M2yr+hihrjOYk/5IQjjJPfPSjrWkJit/W6K7rPzuc4eV8 p4huwfM2Kj5On4Ym Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 not SMBDirect. 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 309eba0..b337ca7 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -409,7 +409,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);