Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751824AbdH2XWs (ORCPT ); Tue, 29 Aug 2017 19:22:48 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:35935 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751669AbdH2XWq (ORCPT ); Tue, 29 Aug 2017 19:22:46 -0400 X-Google-Smtp-Source: ADKCNb59kV4Iab/DprqmsTfl3vYIcSyyHAdYs5D1+SfVC8KELCJg+xiBO0a7a2LRCE0T5ClegB5n2p+nfATU+DRASuc= MIME-Version: 1.0 In-Reply-To: <20170829192915.26251-7-longli@exchange.microsoft.com> References: <20170829192915.26251-1-longli@exchange.microsoft.com> <20170829192915.26251-7-longli@exchange.microsoft.com> From: Pavel Shilovsky Date: Tue, 29 Aug 2017 16:15:29 -0700 Message-ID: Subject: Re: [Patch v3 06/19] CIFS: SMBD: Reconnect to SMBDirect session To: Long Li Cc: Steve French , linux-cifs , samba-technical , Kernel Mailing List , linux-rdma@vger.kernel.org, Christoph Hellwig , Tom Talpey , Matthew Wilcox , Long Li Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1576 Lines: 43 2017-08-29 12:29 GMT-07:00 Long Li : > 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 43b4d54..341a3fd 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); > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-cifs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html It is a easier to follow the logic if the definition is introduced together with using of this function in the existing code. I suggest to add smbd_reconnect() definition in this patch. -- Best regards, Pavel Shilovsky