From patchwork Wed Aug 2 20:10:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 9877543 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 2EBC260360 for ; Wed, 2 Aug 2017 20:16:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20CF5286BB for ; Wed, 2 Aug 2017 20:16:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1599628800; Wed, 2 Aug 2017 20:16: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.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 AE4A5286BB for ; Wed, 2 Aug 2017 20:16:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753100AbdHBUOV (ORCPT ); Wed, 2 Aug 2017 16:14:21 -0400 Received: from a2nlsmtp01-02.prod.iad2.secureserver.net ([198.71.225.36]:56584 "EHLO a2nlsmtp01-02.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753053AbdHBUM1 (ORCPT ); Wed, 2 Aug 2017 16:12:27 -0400 Received: from linuxonhyperv.com ([107.180.71.197]) by : HOSTING RELAY : with SMTP id czzKdRhGshEkZczzKdWmrU; Wed, 02 Aug 2017 13:11:26 -0700 x-originating-ip: 107.180.71.197 Received: from longli by linuxonhyperv.com with local (Exim 4.89) (envelope-from ) id 1dczzK-0005Iz-Cz; Wed, 02 Aug 2017 13:11:26 -0700 From: Long Li To: Steve French , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org Cc: Long Li Subject: [[PATCH v1] 34/37] [CIFS] Reconnect to SMBD transport when it's used Date: Wed, 2 Aug 2017 13:10:45 -0700 Message-Id: <1501704648-20159-35-git-send-email-longli@exchange.microsoft.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1501704648-20159-1-git-send-email-longli@exchange.microsoft.com> References: <1501704648-20159-1-git-send-email-longli@exchange.microsoft.com> X-CMAE-Envelope: MS4wfO06DnmMvsAXJUr+7Vb1qWRsmCVyN1oC2ZG6t2bJBzIkcixPSu2giU7C5+JLWJoaAHmQKVKPjAYoe6O+t3WPDGQhkc99aPgzsPPY0sNKA1AZbIGqvE/8 OF0JnbanG/CIXgaAnJnJJTNVBLZfyrHCKzx+yPNLxGohIDacBYOj9gnZNCUHUaBx4++9EOrubj2QB77c4I/JHTwBUO8TCyKMg5/iMurUAXf6Ell8IrlbSv0V 6enDJABwD9uqXhrNhavxKqNfYC04cGny+qJSKfmnVZcpSEmf3AsKwBc084SPSeuc49KzaKo01lYKKmO+gLnJo+ysVKqPazZsT3dkXmBDDqI= 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 When CIFS wants to reconnect a SMB session, use SMBD if it's being used. 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 1ba5b92..54c1f7c 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 = cifs_reconnect_rdma_session(server); + else + rc = generic_ip_connect(server); + if (rc) { cifs_dbg(FYI, "reconnect error %d\n", rc); mutex_unlock(&server->srv_mutex);