<div dir="ltr"><div>Dear All,</div><div><br></div><div>Recently we tried to build Lustre-2.7.0 server for vanilla Linux kernel version 5, plus zfs-2.3.4, under Debian-12.13 Linux system with Mellanox Infiniband enabled. There are some issues to report. The building options are fixed to:</div><div><br></div><div>- for zfs-2.3.4:</div><div>  ./configure --prefix=/opt/lustre --with-linux=/usr/src/linux-<version> </div><div>- for lustre-2.7.0:</div><div>  export KBUILD_EXTRA_SYMBOLS=/usr/src/zfs-2.3.4/module/Module.symvers</div><div>  ./configure --prefix=/opt/lustre --with-linux=/usr/src/linux-<version> \</div><div>                    --with-zfs=/usr/src/zfs-2.3.4 --with-o2ib=yes --disable-ldiskfs \</div><div>                    --disable-tests --enable-mpitests=no</div><div><br></div><div>1. For vanilla Linux kernel 5.4.279:</div><div>    During compilation, we encounter the following errors:</div><div>=====================================================================</div><div>CC [M]  /usr/src/lustre-2.17.0/libcfs/libcfs/crypto/keyring.o<br>/usr/src/lustre-2.17.0/libcfs/libcfs/crypto/keyring.c: In function free_master_key:<br>/usr/src/lustre-2.17.0/libcfs/libcfs/crypto/keyring.c:55:9: error: implicit declaration of function kfree_sensitive; did you mean kvfree_sensitive? [-Werror=implicit-function-declaration]<br>   55 |         kfree_sensitive(mk);<br>      |         ^~~~~~~~~~~~~~~<br>      |         kvfree_sensitive<br>cc1: all warnings being treated as errors</div><div>=====================================================================</div><div><br></div><div>    After debug, we have to add the following code:</div><div>=====================================================================</div><div>// In the beginning of the source file, and after all the #include files.</div><div>#ifndef HAVE_KFREE_SENSITIVE<br>#define kfree_sensitive(x)      kzfree(x)<br>#endif</div><div>=====================================================================</div><div><br></div><div>    into the following source files:</div><div><br></div><div>    - lustre-2.7.0/libcfs/libcfs/crypto/keyring.c</div><div>    - lustre-2.7.0/libcfs/libcfs/crypto/keysetup_v1.c</div><div><br></div><div>    to work around this problem, since kfree_sensitive() seems not available in vanilla Linux kernel 5.4.X.</div><div><br></div><div>2. For vanilla Linux kernel 5.10.252:</div><div>    During compilation, we encounter the following errors:</div><div>=====================================================================</div><div>  CC [M]  /usr/src/lustre-2.17.0/lustre/llite/pcc.o<br>/usr/src/lustre-2.17.0/lustre/llite/pcc.c: In function __pcc_file_reset_projid:<br>/usr/src/lustre-2.17.0/lustre/llite/pcc.c:3491:18: error: implicit declaration of function get_fs; did you mean sget_fc? [-Werror=implicit-function-declaration]<br> 3491 |         old_fs = get_fs();<br>      |                  ^~~~~~<br>      |                  sget_fc<br>/usr/src/lustre-2.17.0/lustre/llite/pcc.c:3491:18: error: incompatible types when assigning to type mm_segment_t from type int<br>/usr/src/lustre-2.17.0/lustre/llite/pcc.c:3492:9: error: implicit declaration of function set_fs; did you mean sget_fc? [-Werror=implicit-function-declaration]<br> 3492 |         set_fs(KERNEL_DS);<br>      |         ^~~~~~<br>      |         sget_fc<br>/usr/src/lustre-2.17.0/lustre/llite/pcc.c:3492:16: error: KERNEL_DS undeclared (first use in this function); did you mean KERNFS_NS?<br> 3492 |         set_fs(KERNEL_DS);<br>      |                ^~~~~~~~~<br>      |                KERNFS_NS<br>/usr/src/lustre-2.17.0/lustre/llite/pcc.c:3492:16: note: each undeclared identifier is reported only once for each function it appears in<br>cc1: all warnings being treated as errors</div><div>=====================================================================</div><div><br></div><div>    When looking into this problem, the static int __pcc_file_reset_projid() function of the file: lustre-2.17.0/lustre/lllite/pcc.c reads:</div><div>=====================================================================</div><div>#ifdef HAVE_FILEATTR_GET<br>        ....<br>        rc = inode->i_op->fileattr_set(&nop_mnt_idmap, dentry, &fa);<br>#else<br>        ....<br>        old_fs = get_fs();<br>        set_fs(KERNEL_DS);<br>        ....</div><div>#endif</div><div>=====================================================================</div><div>    It is awkward that, for vanilla Linux kernel 5.10.X, the old interface get_fs() and set_fs() were removed. However, the new interface fileattr_set() is not available. As a result, Lustre-2.17.0 cannot be built under vanilla Linux kernel 5.10.X, unless there is a specific patch.</div><div><br></div><div>3. For vanilla Linux kernel 5.15.202:</div><div>    Lustre-2.17.0 can be built successfully. However, when loading lustre modules:</div><div>    modprobe lustre</div><div>    modprobe lnet</div><div><br></div><div>    Both command encountered the following error message in dmesg:</div><div><br></div><div>=====================================================================</div><div>lustre_symbols_init: error -38<br>LNetError: 85487:0:(module.c:664:libcfs_init()) cfs_arch_init: error -38</div><div>=====================================================================</div><div><br></div><div>    I did not debug it carefully. But I suspect that the mechanism of loading modules in kernel 5.15.X might be changed. So Lustre cannot start in this environment.</div><div><br></div><div>So, currently Lustre-2.17.0 server with zfs-2.3.4 can only work in vanilla kernel 5.4.X (I only tested 5.4.279). I hope that this report can be considered to add patches for vanilla kernel 5.15.X, or even 5.10.X, since newer releases of Linux kernel is needed for new hardware as the file servers.</div><div><br></div><div>Best Regards,</div><div>T.H.Hsieh</div></div>