Message ID | 20171018230920.21042-9-longli@exchange.microsoft.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
2017-10-18 16:09 GMT-07:00 Long Li <longli@exchange.microsoft.com>: > From: Long Li <longli@microsoft.com> > > Do a reconnect on SMB Direct when it is used as the connection. Reconnect can > happen for many reasons and it's mostly the decision of SMB2 upper layer. > > Signed-off-by: Long Li <longli@microsoft.com> > --- > fs/cifs/connect.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c > index 2c0b34a..8ca3c13 100644 > --- a/fs/cifs/connect.c > +++ b/fs/cifs/connect.c > @@ -406,7 +406,14 @@ cifs_reconnect(struct TCP_Server_Info *server) > > /* we should try only the port we connected to before */ > mutex_lock(&server->srv_mutex); > +#ifdef CONFIG_CIFS_SMB_DIRECT > + if (server->rdma) > + rc = smbd_reconnect(server); > + else > + rc = generic_ip_connect(server); Minor: here and in other similar places we can remove #else part below and put #endif before else block above. > +#else > rc = generic_ip_connect(server); > +#endif > 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 -- Best regards, Pavel Shilovsky -- 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
From: Pavel Shilovsky [mailto:piastryyy@gmail.com] > 2017-10-18 16:09 GMT-07:00 Long Li <longli@exchange.microsoft.com>: > > From: Long Li <longli@microsoft.com> > > > > Do a reconnect on SMB Direct when it is used as the connection. Reconnect > can > > happen for many reasons and it's mostly the decision of SMB2 upper layer. > > > > Signed-off-by: Long Li <longli@microsoft.com> > > --- > > fs/cifs/connect.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c > > index 2c0b34a..8ca3c13 100644 > > --- a/fs/cifs/connect.c > > +++ b/fs/cifs/connect.c > > @@ -406,7 +406,14 @@ cifs_reconnect(struct TCP_Server_Info *server) > > > > /* we should try only the port we connected to before */ > > mutex_lock(&server->srv_mutex); > > +#ifdef CONFIG_CIFS_SMB_DIRECT > > + if (server->rdma) > > + rc = smbd_reconnect(server); > > + else > > + rc = generic_ip_connect(server); > > Minor: here and in other similar places we can remove #else part below > and put #endif before else block above. > > > +#else > > rc = generic_ip_connect(server); > > +#endif I'd suggest rather: #ifdef CONFIG_CIFS_SMB_DIRECT #define cifs_rdma_enabled(server) ((server)->rdma) #else #define cifs_rdma_enabled(server) 0 #endif Then we don't need an ifdef in the users, just: if (cifs_rdma_enabled(server)) rc = smbd_reconnect(server); else rc = generic_ip_connect(server);
> -----Original Message----- > From: Matthew Wilcox > Sent: Wednesday, November 1, 2017 12:45 PM > To: Pavel Shilovsky <piastryyy@gmail.com>; Long Li <longli@microsoft.com> > Cc: Steve French <sfrench@samba.org>; linux-cifs <linux- > cifs@vger.kernel.org>; samba-technical <samba-technical@lists.samba.org>; > Kernel Mailing List <linux-kernel@vger.kernel.org>; linux- > rdma@vger.kernel.org; Tom Talpey <ttalpey@microsoft.com>; Stephen > Hemminger <sthemmin@microsoft.com>; Long Li <longli@microsoft.com> > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to SMB > Direct session > > From: Pavel Shilovsky [mailto:piastryyy@gmail.com] > > 2017-10-18 16:09 GMT-07:00 Long Li <longli@exchange.microsoft.com>: > > > From: Long Li <longli@microsoft.com> > > > > > > Do a reconnect on SMB Direct when it is used as the connection. > > > Reconnect > > can > > > happen for many reasons and it's mostly the decision of SMB2 upper > layer. > > > > > > Signed-off-by: Long Li <longli@microsoft.com> > > > --- > > > fs/cifs/connect.c | 7 +++++++ > > > 1 file changed, 7 insertions(+) > > > > > > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index > > > 2c0b34a..8ca3c13 100644 > > > --- a/fs/cifs/connect.c > > > +++ b/fs/cifs/connect.c > > > @@ -406,7 +406,14 @@ cifs_reconnect(struct TCP_Server_Info *server) > > > > > > /* we should try only the port we connected to before */ > > > mutex_lock(&server->srv_mutex); > > > +#ifdef CONFIG_CIFS_SMB_DIRECT > > > + if (server->rdma) > > > + rc = smbd_reconnect(server); > > > + else > > > + rc = generic_ip_connect(server); > > > > Minor: here and in other similar places we can remove #else part below > > and put #endif before else block above. > > > > > +#else > > > rc = generic_ip_connect(server); > > > +#endif > > I'd suggest rather: > > #ifdef CONFIG_CIFS_SMB_DIRECT > #define cifs_rdma_enabled(server) ((server)->rdma) > #else > #define cifs_rdma_enabled(server) 0 > #endif > > Then we don't need an ifdef in the users, just: > > if (cifs_rdma_enabled(server)) > rc = smbd_reconnect(server); > else > rc = generic_ip_connect(server); I will fix this. Thank you. Long
DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogc2FtYmEtdGVjaG5pY2Fs IFttYWlsdG86c2FtYmEtdGVjaG5pY2FsLWJvdW5jZXNAbGlzdHMuc2FtYmEub3JnXQ0KPiBPbiBC ZWhhbGYgT2YgTG9uZyBMaSB2aWEgc2FtYmEtdGVjaG5pY2FsDQo+IFNlbnQ6IFN1bmRheSwgTm92 ZW1iZXIgNSwgMjAxNyAxMDozNyBBTQ0KPiBUbzogTWF0dGhldyBXaWxjb3ggPG1hd2lsY294QG1p Y3Jvc29mdC5jb20+OyBQYXZlbCBTaGlsb3Zza3kNCj4gPHBpYXN0cnl5eUBnbWFpbC5jb20+DQo+ IENjOiBsaW51eC1jaWZzIDxsaW51eC1jaWZzQHZnZXIua2VybmVsLm9yZz47IFN0ZXBoZW4gSGVt bWluZ2VyDQo+IDxzdGhlbW1pbkBtaWNyb3NvZnQuY29tPjsgbGludXgtcmRtYUB2Z2VyLmtlcm5l bC5vcmc7IHNhbWJhLXRlY2huaWNhbA0KPiA8c2FtYmEtdGVjaG5pY2FsQGx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S0+cmRtYSkNCj4gPiAjZWxzZQ0KPiA+ICNk ZWZpbmUgY2lmc19yZG1hX2VuYWJsZWQoc2VydmVyKQkwDQo+ID4gI2VuZGlmDQo+ID4NCj4gPiBU aGVuIHdlIGRvbid0IG5lZWQgYW4gaWZkZWYgaW4gdGhlIHVzZXJzLCBqdXN0Og0KPiA+DQo+ID4g CWlmIChjaWZzX3JkbWFfZW5hYmxlZChzZXJ2ZXIpKQ0KPiA+IAkJcmMgPSBzbWJkX3JlY29ubmVj dChzZXJ2ZXIpOw0KPiA+IAllbHNlDQo+ID4gCQlyYyA9IGdlbmVyaWNfaXBfY29ubmVjdChzZXJ2 ZXIpOw0KDQpJdCBkb2Vzbid0IHdvcmsgd2VsbCwgYmVjYXVzZSBzbWJkX3JlY29ubmVjdCBpcyBk ZWZpbmVkIHdoZW4gQ09ORklHX0NJRlNfU01CX0RJUkVDVCBpcyBzZXQuIE5vdyB0aGUgY29tcGls ZXIgaXMgY29tcGxhaW5pbmcgaXQgY2FuJ3QgZmluZCB0aGlzIGZ1bmN0aW9uLiBNYXliZSBjb21w aWxlciBpcyBub3Qgc21hcnQgZW5vdWdoIDopDQoNCkkgaGF2ZSBzZW50IHY2IGZvciBhbGwgdGhl IG90aGVyIGNvbW1lbnRzLg0K -- 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
T2gsIEkgaGFkbid0IG5vdGljZWQgdGhhdC4gIFRoZW4gSSBhbWVuZCBteSBzdWdnZXN0aW9uIHRv IGJlOg0KDQojaWZkZWYgQ09ORklHX0NJRlNfU01CX0RJUkVDVA0KI2RlZmluZSBjaWZzX3JkbWFf ZW5hYmxlZChzZXJ2ZXIpCSgoc2VydmVyKS0+cmRtYSkNCiNlbHNlDQojZGVmaW5lIGNpZnNfcmRt YV9lbmFibGVkKHNlcnZlcikJMA0Kc3RhdGljIGlubGluZSB2b2lkIGNpZnNfcmVjb25uZWN0KH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BmaW5kDQo+IHRoaXMgZnVuY3Rpb24uIE1heWJlIGNvbXBpbGVyIGlz IG5vdCBzbWFydCBlbm91Z2ggOikNCj4gDQo+IEkgaGF2ZSBzZW50IHY2IGZvciBhbGwgdGhlIG90 aGVyIGNvbW1lbnRzLg0K -- 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
> -----Original Message----- > From: Matthew Wilcox > Sent: Monday, November 6, 2017 10:10 AM > To: Long Li <longli@microsoft.com>; Pavel Shilovsky <piastryyy@gmail.com> > Cc: linux-cifs <linux-cifs@vger.kernel.org>; Stephen Hemminger > <sthemmin@microsoft.com>; linux-rdma@vger.kernel.org; Kernel Mailing > List <linux-kernel@vger.kernel.org>; Steve French <sfrench@samba.org> > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to SMB > Direct session > > Oh, I hadn't noticed that. Then I amend my suggestion to be: > > #ifdef CONFIG_CIFS_SMB_DIRECT > #define cifs_rdma_enabled(server) ((server)->rdma) > #else > #define cifs_rdma_enabled(server) 0 > static inline void cifs_reconnect(struct TCP_Server_Info *server) { } #endif I will address those and update patch. > > > -----Original Message----- > > From: Long Li > > Sent: Sunday, November 5, 2017 2:20 PM > > To: Long Li <longli@microsoft.com>; Matthew Wilcox > > <mawilcox@microsoft.com>; Pavel Shilovsky <piastryyy@gmail.com> > > Cc: linux-cifs <linux-cifs@vger.kernel.org>; Stephen Hemminger > > <sthemmin@microsoft.com>; linux-rdma@vger.kernel.org; Kernel Mailing > > List <linux-kernel@vger.kernel.org>; Steve French <sfrench@samba.org> > > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to > > SMB Direct session > > > > > > > > > -----Original Message----- > > > From: samba-technical > > > [mailto:samba-technical-bounces@lists.samba.org] > > > On Behalf Of Long Li via samba-technical > > > Sent: Sunday, November 5, 2017 10:37 AM > > > To: Matthew Wilcox <mawilcox@microsoft.com>; Pavel Shilovsky > > > <piastryyy@gmail.com> > > > Cc: linux-cifs <linux-cifs@vger.kernel.org>; Stephen Hemminger > > > <sthemmin@microsoft.com>; linux-rdma@vger.kernel.org; > > > samba-technical <samba-technical@lists.samba.org>; Kernel Mailing > > > List <linux- kernel@vger.kernel.org>; Steve French > > > <sfrench@samba.org> > > > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to > > > SMB Direct session > > > > > > > -----Original Message----- > > > > From: Matthew Wilcox > > > > Sent: Wednesday, November 1, 2017 12:45 PM > > > > To: Pavel Shilovsky <piastryyy@gmail.com>; Long Li > > > > <longli@microsoft.com> > > > > Cc: Steve French <sfrench@samba.org>; linux-cifs <linux- > > > > cifs@vger.kernel.org>; samba-technical > > > > <samba-technical@lists.samba.org>; > > > > Kernel Mailing List <linux-kernel@vger.kernel.org>; linux- > > > > rdma@vger.kernel.org; Tom Talpey <ttalpey@microsoft.com>; > Stephen > > > > Hemminger <sthemmin@microsoft.com>; Long Li > <longli@microsoft.com> > > > > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects > > > > to SMB Direct session > > > > > > > > From: Pavel Shilovsky [mailto:piastryyy@gmail.com] > > > > > 2017-10-18 16:09 GMT-07:00 Long Li > <longli@exchange.microsoft.com>: > > > > > > From: Long Li <longli@microsoft.com> > > > > > > > > > > > > Do a reconnect on SMB Direct when it is used as the connection. > > > > > > Reconnect > > > > > can > > > > > > happen for many reasons and it's mostly the decision of SMB2 > > > > > > upper > > > > layer. > > > > > > > > > > > > Signed-off-by: Long Li <longli@microsoft.com> > > > > > > --- > > > > > > fs/cifs/connect.c | 7 +++++++ > > > > > > 1 file changed, 7 insertions(+) > > > > > > > > > > > > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index > > > > > > 2c0b34a..8ca3c13 100644 > > > > > > --- a/fs/cifs/connect.c > > > > > > +++ b/fs/cifs/connect.c > > > > > > @@ -406,7 +406,14 @@ cifs_reconnect(struct TCP_Server_Info > > > > > > *server) > > > > > > > > > > > > /* we should try only the port we connected to before */ > > > > > > mutex_lock(&server->srv_mutex); > > > > > > +#ifdef CONFIG_CIFS_SMB_DIRECT > > > > > > + if (server->rdma) > > > > > > + rc = smbd_reconnect(server); > > > > > > + else > > > > > > + rc = generic_ip_connect(server); > > > > > > > > > > Minor: here and in other similar places we can remove #else part > > > > > below and put #endif before else block above. > > > > > > > > > > > +#else > > > > > > rc = generic_ip_connect(server); > > > > > > +#endif > > > > > > > > I'd suggest rather: > > > > > > > > #ifdef CONFIG_CIFS_SMB_DIRECT > > > > #define cifs_rdma_enabled(server) ((server)->rdma) > > > > #else > > > > #define cifs_rdma_enabled(server) 0 > > > > #endif > > > > > > > > Then we don't need an ifdef in the users, just: > > > > > > > > if (cifs_rdma_enabled(server)) > > > > rc = smbd_reconnect(server); > > > > else > > > > rc = generic_ip_connect(server); > > > > It doesn't work well, because smbd_reconnect is defined when > > CONFIG_CIFS_SMB_DIRECT is set. Now the compiler is complaining it > > can't find this function. Maybe compiler is not smart enough :) > > > > I have sent v6 for all the other comments.
> -----Original Message----- > From: linux-cifs-owner@vger.kernel.org [mailto:linux-cifs- > owner@vger.kernel.org] On Behalf Of Long Li > Sent: Monday, November 6, 2017 2:00 PM > To: Matthew Wilcox <mawilcox@microsoft.com>; Pavel Shilovsky > <piastryyy@gmail.com> > Cc: linux-cifs <linux-cifs@vger.kernel.org>; Stephen Hemminger > <sthemmin@microsoft.com>; linux-rdma@vger.kernel.org; Kernel Mailing List > <linux-kernel@vger.kernel.org>; Steve French <sfrench@samba.org> > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to SMB > Direct session > > > -----Original Message----- > > From: Matthew Wilcox > > Sent: Monday, November 6, 2017 10:10 AM > > To: Long Li <longli@microsoft.com>; Pavel Shilovsky <piastryyy@gmail.com> > > Cc: linux-cifs <linux-cifs@vger.kernel.org>; Stephen Hemminger > > <sthemmin@microsoft.com>; linux-rdma@vger.kernel.org; Kernel Mailing > > List <linux-kernel@vger.kernel.org>; Steve French <sfrench@samba.org> > > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to SMB > > Direct session > > > > Oh, I hadn't noticed that. Then I amend my suggestion to be: > > > > #ifdef CONFIG_CIFS_SMB_DIRECT > > #define cifs_rdma_enabled(server) ((server)->rdma) > > #else > > #define cifs_rdma_enabled(server) 0 > > static inline void cifs_reconnect(struct TCP_Server_Info *server) { } #endif > > I will address those and update patch. I don't think stubbing such a generic-looking function cifs_reconnect() under an RDMA conditional is a good idea. It would seem to hide what's truly going on, and deeply confuse someone who tried to code cifs_reconnect() on any other code path, thinking it would, well, reconnect. How about cifs_rdma_reconnect()? That would be fine to override. Tom. > > > > > > -----Original Message----- > > > From: Long Li > > > Sent: Sunday, November 5, 2017 2:20 PM > > > To: Long Li <longli@microsoft.com>; Matthew Wilcox > > > <mawilcox@microsoft.com>; Pavel Shilovsky <piastryyy@gmail.com> > > > Cc: linux-cifs <linux-cifs@vger.kernel.org>; Stephen Hemminger > > > <sthemmin@microsoft.com>; linux-rdma@vger.kernel.org; Kernel Mailing > > > List <linux-kernel@vger.kernel.org>; Steve French <sfrench@samba.org> > > > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to > > > SMB Direct session > > > > > > > > > > > > > -----Original Message----- > > > > From: samba-technical > > > > [mailto:samba-technical-bounces@lists.samba.org] > > > > On Behalf Of Long Li via samba-technical > > > > Sent: Sunday, November 5, 2017 10:37 AM > > > > To: Matthew Wilcox <mawilcox@microsoft.com>; Pavel Shilovsky > > > > <piastryyy@gmail.com> > > > > Cc: linux-cifs <linux-cifs@vger.kernel.org>; Stephen Hemminger > > > > <sthemmin@microsoft.com>; linux-rdma@vger.kernel.org; > > > > samba-technical <samba-technical@lists.samba.org>; Kernel Mailing > > > > List <linux- kernel@vger.kernel.org>; Steve French > > > > <sfrench@samba.org> > > > > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to > > > > SMB Direct session > > > > > > > > > -----Original Message----- > > > > > From: Matthew Wilcox > > > > > Sent: Wednesday, November 1, 2017 12:45 PM > > > > > To: Pavel Shilovsky <piastryyy@gmail.com>; Long Li > > > > > <longli@microsoft.com> > > > > > Cc: Steve French <sfrench@samba.org>; linux-cifs <linux- > > > > > cifs@vger.kernel.org>; samba-technical > > > > > <samba-technical@lists.samba.org>; > > > > > Kernel Mailing List <linux-kernel@vger.kernel.org>; linux- > > > > > rdma@vger.kernel.org; Tom Talpey <ttalpey@microsoft.com>; > > Stephen > > > > > Hemminger <sthemmin@microsoft.com>; Long Li > > <longli@microsoft.com> > > > > > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects > > > > > to SMB Direct session > > > > > > > > > > From: Pavel Shilovsky [mailto:piastryyy@gmail.com] > > > > > > 2017-10-18 16:09 GMT-07:00 Long Li > > <longli@exchange.microsoft.com>: > > > > > > > From: Long Li <longli@microsoft.com> > > > > > > > > > > > > > > Do a reconnect on SMB Direct when it is used as the connection. > > > > > > > Reconnect > > > > > > can > > > > > > > happen for many reasons and it's mostly the decision of SMB2 > > > > > > > upper > > > > > layer. > > > > > > > > > > > > > > Signed-off-by: Long Li <longli@microsoft.com> > > > > > > > --- > > > > > > > fs/cifs/connect.c | 7 +++++++ > > > > > > > 1 file changed, 7 insertions(+) > > > > > > > > > > > > > > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index > > > > > > > 2c0b34a..8ca3c13 100644 > > > > > > > --- a/fs/cifs/connect.c > > > > > > > +++ b/fs/cifs/connect.c > > > > > > > @@ -406,7 +406,14 @@ cifs_reconnect(struct TCP_Server_Info > > > > > > > *server) > > > > > > > > > > > > > > /* we should try only the port we connected to before */ > > > > > > > mutex_lock(&server->srv_mutex); > > > > > > > +#ifdef CONFIG_CIFS_SMB_DIRECT > > > > > > > + if (server->rdma) > > > > > > > + rc = smbd_reconnect(server); > > > > > > > + else > > > > > > > + rc = generic_ip_connect(server); > > > > > > > > > > > > Minor: here and in other similar places we can remove #else part > > > > > > below and put #endif before else block above. > > > > > > > > > > > > > +#else > > > > > > > rc = generic_ip_connect(server); > > > > > > > +#endif > > > > > > > > > > I'd suggest rather: > > > > > > > > > > #ifdef CONFIG_CIFS_SMB_DIRECT > > > > > #define cifs_rdma_enabled(server) ((server)->rdma) > > > > > #else > > > > > #define cifs_rdma_enabled(server) 0 > > > > > #endif > > > > > > > > > > Then we don't need an ifdef in the users, just: > > > > > > > > > > if (cifs_rdma_enabled(server)) > > > > > rc = smbd_reconnect(server); > > > > > else > > > > > rc = generic_ip_connect(server); > > > > > > It doesn't work well, because smbd_reconnect is defined when > > > CONFIG_CIFS_SMB_DIRECT is set. Now the compiler is complaining it > > > can't find this function. Maybe compiler is not smart enough :) > > > > > > I have sent v6 for all the other comments. > ��칻�&�~�&���+- > ��ݶ��w��˛���m�b��\��"��^n�r���z���h����&���G���h�(�階 > �ݢj"���m�����z�ޖ���f���h���~�m�
> -----Original Message----- > From: Tom Talpey > Sent: Monday, November 6, 2017 12:26 PM > To: Long Li <longli@microsoft.com>; Matthew Wilcox > <mawilcox@microsoft.com>; Pavel Shilovsky <piastryyy@gmail.com> > Cc: linux-cifs <linux-cifs@vger.kernel.org>; Stephen Hemminger > <sthemmin@microsoft.com>; linux-rdma@vger.kernel.org; Kernel Mailing > List <linux-kernel@vger.kernel.org>; Steve French <sfrench@samba.org> > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to SMB > Direct session > > > -----Original Message----- > > From: linux-cifs-owner@vger.kernel.org [mailto:linux-cifs- > > owner@vger.kernel.org] On Behalf Of Long Li > > Sent: Monday, November 6, 2017 2:00 PM > > To: Matthew Wilcox <mawilcox@microsoft.com>; Pavel Shilovsky > > <piastryyy@gmail.com> > > Cc: linux-cifs <linux-cifs@vger.kernel.org>; Stephen Hemminger > > <sthemmin@microsoft.com>; linux-rdma@vger.kernel.org; Kernel Mailing > > List <linux-kernel@vger.kernel.org>; Steve French <sfrench@samba.org> > > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to > > SMB Direct session > > > > > -----Original Message----- > > > From: Matthew Wilcox > > > Sent: Monday, November 6, 2017 10:10 AM > > > To: Long Li <longli@microsoft.com>; Pavel Shilovsky > > > <piastryyy@gmail.com> > > > Cc: linux-cifs <linux-cifs@vger.kernel.org>; Stephen Hemminger > > > <sthemmin@microsoft.com>; linux-rdma@vger.kernel.org; Kernel > Mailing > > > List <linux-kernel@vger.kernel.org>; Steve French > > > <sfrench@samba.org> > > > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to > > > SMB Direct session > > > > > > Oh, I hadn't noticed that. Then I amend my suggestion to be: > > > > > > #ifdef CONFIG_CIFS_SMB_DIRECT > > > #define cifs_rdma_enabled(server) ((server)->rdma) > > > #else > > > #define cifs_rdma_enabled(server) 0 > > > static inline void cifs_reconnect(struct TCP_Server_Info *server) { > > > } #endif > > > > I will address those and update patch. > > I don't think stubbing such a generic-looking function cifs_reconnect() under > an RDMA conditional is a good idea. It would seem to hide what's truly going > on, and deeply confuse someone who tried to code cifs_reconnect() on any > other code path, thinking it would, well, reconnect. > > How about cifs_rdma_reconnect()? That would be fine to override. Yes this makes more sense, this is the approach I'm going to code. > > Tom. > > > > > > > > > > -----Original Message----- > > > > From: Long Li > > > > Sent: Sunday, November 5, 2017 2:20 PM > > > > To: Long Li <longli@microsoft.com>; Matthew Wilcox > > > > <mawilcox@microsoft.com>; Pavel Shilovsky <piastryyy@gmail.com> > > > > Cc: linux-cifs <linux-cifs@vger.kernel.org>; Stephen Hemminger > > > > <sthemmin@microsoft.com>; linux-rdma@vger.kernel.org; Kernel > > > > Mailing List <linux-kernel@vger.kernel.org>; Steve French > > > > <sfrench@samba.org> > > > > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects > > > > to SMB Direct session > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: samba-technical > > > > > [mailto:samba-technical-bounces@lists.samba.org] > > > > > On Behalf Of Long Li via samba-technical > > > > > Sent: Sunday, November 5, 2017 10:37 AM > > > > > To: Matthew Wilcox <mawilcox@microsoft.com>; Pavel Shilovsky > > > > > <piastryyy@gmail.com> > > > > > Cc: linux-cifs <linux-cifs@vger.kernel.org>; Stephen Hemminger > > > > > <sthemmin@microsoft.com>; linux-rdma@vger.kernel.org; > > > > > samba-technical <samba-technical@lists.samba.org>; Kernel > > > > > Mailing List <linux- kernel@vger.kernel.org>; Steve French > > > > > <sfrench@samba.org> > > > > > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects > > > > > to SMB Direct session > > > > > > > > > > > -----Original Message----- > > > > > > From: Matthew Wilcox > > > > > > Sent: Wednesday, November 1, 2017 12:45 PM > > > > > > To: Pavel Shilovsky <piastryyy@gmail.com>; Long Li > > > > > > <longli@microsoft.com> > > > > > > Cc: Steve French <sfrench@samba.org>; linux-cifs <linux- > > > > > > cifs@vger.kernel.org>; samba-technical > > > > > > <samba-technical@lists.samba.org>; > > > > > > Kernel Mailing List <linux-kernel@vger.kernel.org>; linux- > > > > > > rdma@vger.kernel.org; Tom Talpey <ttalpey@microsoft.com>; > > > Stephen > > > > > > Hemminger <sthemmin@microsoft.com>; Long Li > > > <longli@microsoft.com> > > > > > > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer > > > > > > reconnects to SMB Direct session > > > > > > > > > > > > From: Pavel Shilovsky [mailto:piastryyy@gmail.com] > > > > > > > 2017-10-18 16:09 GMT-07:00 Long Li > > > <longli@exchange.microsoft.com>: > > > > > > > > From: Long Li <longli@microsoft.com> > > > > > > > > > > > > > > > > Do a reconnect on SMB Direct when it is used as the connection. > > > > > > > > Reconnect > > > > > > > can > > > > > > > > happen for many reasons and it's mostly the decision of > > > > > > > > SMB2 upper > > > > > > layer. > > > > > > > > > > > > > > > > Signed-off-by: Long Li <longli@microsoft.com> > > > > > > > > --- > > > > > > > > fs/cifs/connect.c | 7 +++++++ > > > > > > > > 1 file changed, 7 insertions(+) > > > > > > > > > > > > > > > > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index > > > > > > > > 2c0b34a..8ca3c13 100644 > > > > > > > > --- a/fs/cifs/connect.c > > > > > > > > +++ b/fs/cifs/connect.c > > > > > > > > @@ -406,7 +406,14 @@ cifs_reconnect(struct TCP_Server_Info > > > > > > > > *server) > > > > > > > > > > > > > > > > /* we should try only the port we connected to before > */ > > > > > > > > mutex_lock(&server->srv_mutex); > > > > > > > > +#ifdef CONFIG_CIFS_SMB_DIRECT > > > > > > > > + if (server->rdma) > > > > > > > > + rc = smbd_reconnect(server); > > > > > > > > + else > > > > > > > > + rc = generic_ip_connect(server); > > > > > > > > > > > > > > Minor: here and in other similar places we can remove #else > > > > > > > part below and put #endif before else block above. > > > > > > > > > > > > > > > +#else > > > > > > > > rc = generic_ip_connect(server); > > > > > > > > +#endif > > > > > > > > > > > > I'd suggest rather: > > > > > > > > > > > > #ifdef CONFIG_CIFS_SMB_DIRECT > > > > > > #define cifs_rdma_enabled(server) ((server)->rdma) > > > > > > #else > > > > > > #define cifs_rdma_enabled(server) 0 > > > > > > #endif > > > > > > > > > > > > Then we don't need an ifdef in the users, just: > > > > > > > > > > > > if (cifs_rdma_enabled(server)) > > > > > > rc = smbd_reconnect(server); > > > > > > else > > > > > > rc = generic_ip_connect(server); > > > > > > > > It doesn't work well, because smbd_reconnect is defined when > > > > CONFIG_CIFS_SMB_DIRECT is set. Now the compiler is complaining it > > > > can't find this function. Maybe compiler is not smart enough :) > > > > > > > > I have sent v6 for all the other comments. > > 칻 & ~ & +- > > ݶ w ˛ m b \ " ^n r z h & G h ( 階 > > ݢj" m z ޖ f h ~ m
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 2c0b34a..8ca3c13 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -406,7 +406,14 @@ cifs_reconnect(struct TCP_Server_Info *server) /* we should try only the port we connected to before */ mutex_lock(&server->srv_mutex); +#ifdef CONFIG_CIFS_SMB_DIRECT + if (server->rdma) + rc = smbd_reconnect(server); + else + rc = generic_ip_connect(server); +#else rc = generic_ip_connect(server); +#endif if (rc) { cifs_dbg(FYI, "reconnect error %d\n", rc); mutex_unlock(&server->srv_mutex);