[lustre-discuss] kernel 5.10 on RHEL8 and lustre-client kind of working

Andreas Dilger adilger at whamcloud.com
Wed May 5 00:57:11 PDT 2021


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 <lustre-discuss at lists.lustre.org<mailto:lustre-discuss at lists.lustre.org>> 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: Andrej.Filipcic at ijs.si<mailto:Andrej.Filipcic at ijs.si>
  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
lustre-discuss at lists.lustre.org<mailto:lustre-discuss at lists.lustre.org>
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org

Cheers, Andreas
--
Andreas Dilger
Principal Lustre Architect
Whamcloud






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lustre.org/pipermail/lustre-discuss-lustre.org/attachments/20210505/15c0e1bd/attachment.html>


More information about the lustre-discuss mailing list