Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751781AbdH2Xjj (ORCPT ); Tue, 29 Aug 2017 19:39:39 -0400 Received: from mail-sn1nam01on0102.outbound.protection.outlook.com ([104.47.32.102]:22371 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751514AbdH2Xjg (ORCPT ); Tue, 29 Aug 2017 19:39:36 -0400 From: Long Li To: Pavel Shilovsky CC: Steve French , linux-cifs , samba-technical , Kernel Mailing List , "linux-rdma@vger.kernel.org" , Christoph Hellwig , "Tom Talpey" , Matthew Wilcox Subject: RE: [Patch v3 06/19] CIFS: SMBD: Reconnect to SMBDirect session Thread-Topic: [Patch v3 06/19] CIFS: SMBD: Reconnect to SMBDirect session Thread-Index: AQHTIP1NaOYhJ+ddQ0GGs0Mm/fRxVaKb922AgAAGbhA= Date: Tue, 29 Aug 2017 23:39:29 +0000 Message-ID: References: <20170829192915.26251-1-longli@exchange.microsoft.com> <20170829192915.26251-7-longli@exchange.microsoft.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Ref=https://api.informationprotection.azure.com/api/72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=longli@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2017-08-29T16:39:28.0355247-07:00; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General x-originating-ip: [2001:4898:80e8:c::735] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR21MB0477;6:j/GrVMaS/49aM3V1VAvzMkJ+ad5DIxCoxP7+Z7hJ8f0mM/fClESBFqiB0iRIaeL22HQLXXJxcumkq5Oi85VnjYoPlTycakEnkKNvk3MATojVyYao7a8qrNCvyNfPvLncperCy4J9sUt5J9PR3dT0Y6inaUp4t/fugp2cTui1shiECG9qA8q+SqKoQ1CKrD+iXB+SWUt/omymJgiDjfVo1raO7GX9lNmYSdIe2tQbVawTQXrcVQFZSF5/VVOr+VtDlCXdNsJAjdnMM7+mcAdi0V5moO2LYCQtIBqayjtpYN8XzfKdgL9T6ItVJv6zg5fsBOu4MYdggKOc027f3nPY/Q==;5:m3q70YBIgPeP7IhoCOM92+88TysMOn616TEAHe3zLHmaIPsqTmULQl8Qyt97zHLT+FvPwoQZq/fsjnJSO6E4/dXV33mwXEZpHXahROC7WRVpatshiYsaBdqmjsCZUztPdehEd8tUUdT59rnPVGKFfA==;24:aRvT95S6my/ML5idK0J4uPdVWTZcG1AlCI48QObRbkQU+k3BdFbsn5uM8JotZIOLC8QECd+quebi/+ZC9b6V1EagVElaFGP9ZbMLuTG3luQ=;7:ioxnEhlu004397iqiQnvTXiP4qQRxQoOIp/ZbuO4NAcX1x3qU769HJmhHp20aabFLJYpxUzh9v/Ag+TzHG/n2/g7Y4AARAwkoyJ1XNEO2G2Tl5b4cKpEOh3QNyk7RCi5MA74kyov4RCA3boT1Wqm5e5v0CSYBUzR0eNy+qiFoeaIE5VChd7Xm8JP+tmMcd4uJV7R84Bj/Jt5D2b8XmuxI+iakDHoMmK4p4fTVQRElPw= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: d3957876-3bd7-4035-c0bf-08d4ef373182 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:MWHPR21MB0477; x-ms-traffictypediagnostic: MWHPR21MB0477: x-exchange-antispam-report-test: UriScan:(89211679590171)(9452136761055)(189930954265078)(140211028294663)(219752817060721); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(20161123564025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:MWHPR21MB0477;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:MWHPR21MB0477; x-forefront-prvs: 0414DF926F x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(47760400005)(377424004)(199003)(189002)(377454003)(13464003)(69234005)(101416001)(4326008)(10090500001)(25786009)(6436002)(6246003)(106356001)(110136004)(105586002)(8936002)(478600001)(77096006)(33656002)(6506006)(97736004)(39060400002)(2900100001)(76176999)(54356999)(305945005)(50986999)(10290500003)(8676002)(81156014)(81166006)(189998001)(74316002)(86612001)(7736002)(3280700002)(229853002)(3660700001)(2950100002)(53936002)(14454004)(54906002)(6306002)(966005)(55016002)(2906002)(9686003)(99286003)(1411001)(68736007)(6116002)(102836003)(7696004)(107886003)(5005710100001)(8990500004)(5660300001)(6916009)(53546010)(86362001);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR21MB0477;H:MWHPR21MB0190.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; authentication-results: spf=none (sender IP is ) smtp.mailfrom=longli@microsoft.com; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Aug 2017 23:39:29.6006 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR21MB0477 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v7TNdmoq022942 Content-Length: 2597 Lines: 72 > -----Original Message----- > From: Pavel Shilovsky [mailto:piastryyy@gmail.com] > Sent: Tuesday, August 29, 2017 4:15 PM > To: Long Li > Cc: Steve French ; linux-cifs cifs@vger.kernel.org>; samba-technical ; > Kernel Mailing List ; linux- > rdma@vger.kernel.org; Christoph Hellwig ; Tom Talpey > ; Matthew Wilcox ; > Long Li > Subject: Re: [Patch v3 06/19] CIFS: SMBD: Reconnect to SMBDirect session > > 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 > > > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvger.k > > ernel.org%2Fmajordomo- > info.html&data=02%7C01%7Clongli%40microsoft.com% > > > 7C192678645752449a875b08d4ef33d874%7C72f988bf86f141af91ab2d7cd011d > b47% > > > 7C1%7C0%7C636396453334398562&sdata=i5dZUoUU91foFGipTsgQBnmYJeU > aeWww2QI > > xoP9BSO4%3D&reserved=0 > > 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. I will do this in v4. > -- > Best regards, > Pavel Shilovsky