Furthermore, I notice that you mention that you are running “DDN Lustre servers 
2.12.6”. so you should also check with DDN support before making any changes to 
the code that you are running in production.

From: lustre-discuss <[email protected]> on behalf of 
Andreas Dilger via lustre-discuss <[email protected]>
Reply-To: Andreas Dilger <[email protected]>
Date: Wednesday, May 5, 2021 at 12:57 AM
To: Andrej Filipcic <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [lustre-discuss] kernel 5.10 on RHEL8 and lustre-client kind of 
working

Hi Andrej,
could you please check if your change is included in one of the patches in 
https://jira.whamcloud.com/browse/LU-14195 "Support for linux kernel version 
5.10"?  If not, that would be the natural ticket to reference when submit this 
patch.  Note, however, that the same code also needs to be conditional based on 
configure checks of the kernel for the appropriate symbols so that it works on 
all supported kernels.


On May 3, 2021, at 09:47, Andrej Filipcic via lustre-discuss 
<[email protected]<mailto:[email protected]>> wrote:


Hi,

I compiled the master from today (commit 
0b7ddf32e336b06d459880faf9831db43ffae9cf) on 5.10.34 kernel with mpi support 
(RHEL8.3 otherwise), and it seems to work properly for me. I needed to do the 
following changes, while cross-checking LU-14195

diff --git a/lnet/lnet/lib-socket.c b/lnet/lnet/lib-socket.c
index 4a86114ecf..1412d9deb0 100644
--- a/lnet/lnet/lib-socket.c
+++ b/lnet/lnet/lib-socket.c
@@ -343,9 +343,10 @@ struct socket *
 lnet_sock_listen(int local_port, int backlog, struct net *ns)
 {
        struct socket *sock;
-       mm_segment_t oldfs;
+       //mm_segment_t oldfs;
        int val = 0;
        int rc;
+       sockptr_t sval;

        sock = lnet_sock_create(-1, NULL, local_port, ns);
        if (IS_ERR(sock)) {
@@ -360,11 +361,13 @@ lnet_sock_listen(int local_port, int backlog, struct net 
*ns)
         * This is the default, but it can be overridden so
         * we force it back.
         */
-       oldfs = get_fs();
-       set_fs(KERNEL_DS);
+       //oldfs = get_fs();
+       //set_fs(KERNEL_DS);
+       //sock->ops->setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
+       //                    (char __user __force *) &val, sizeof(val));
        sock->ops->setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
-                             (char __user __force *) &val, sizeof(val));
-       set_fs(oldfs);
+                              sval, sizeof(val));
+       //set_fs(oldfs);

        rc = kernel_listen(sock, backlog);
        if (rc == 0)

With this version, the client works quite fine over o2ib (Mellanox drivers) 
with DDN Lustre servers  2.12.6, tested with several writes, unpacking and 
compiling kernel in lustre etc...

Can somebody please tell  if the fixes above are correct, or if there is any 
danger in using the master for clients in production?

Best regards,
Andrej

--
_____________________________________________________________
  prof. dr. Andrej Filipcic,   E-mail: 
[email protected]<mailto:[email protected]>
  Department of Experimental High Energy Physics - F9
  Jozef Stefan Institute, Jamova 39, P.o.Box 3000
  SI-1001 Ljubljana, Slovenia
  Tel.: +386-1-477-3674    Fax: +386-1-425-7074
-------------------------------------------------------------

_______________________________________________
lustre-discuss mailing list
[email protected]<mailto:[email protected]>
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org

Cheers, Andreas
--
Andreas Dilger
Principal Lustre Architect
Whamcloud





_______________________________________________
lustre-discuss mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org

Reply via email to