<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div style="direction: ltr; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
There is a mix of Lustre versions - 2.7.0 and 2.17.0 - referenced below. The former is ~ 11 years old and it would be no surprise if there were issues trying to build with current versions of other software. Was this just an error during the writeup?</div>
<div style="direction: ltr; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="mail-editor-reference-message-container">
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; padding: 3pt 0in 0in; border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; font-family: Aptos; font-size: 12pt; color: black;">
<b>From: </b>lustre-discuss <lustre-discuss-bounces@lists.lustre.org> on behalf of Tung-Han Hsieh via lustre-discuss <lustre-discuss@lists.lustre.org><br>
<b>Date: </b>Sunday, March 29, 2026 at 9:21 PM<br>
<b>To: </b>lustre <lustre-discuss@lists.lustre.org><br>
<b>Subject: </b>[lustre-discuss] Issues of building Lustre-2.7.0 for vanilla Linux kernel<br>
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
Dear All,</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
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 class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
- for zfs-2.3.4:</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
./configure --prefix=/opt/lustre --with-linux=/usr/src/linux-<version> </div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
- for lustre-2.7.0:</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
export KBUILD_EXTRA_SYMBOLS=/usr/src/zfs-2.3.4/module/Module.symvers</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
./configure --prefix=/opt/lustre --with-linux=/usr/src/linux-<version> \</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
--with-zfs=/usr/src/zfs-2.3.4 --with-o2ib=yes --disable-ldiskfs \</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
--disable-tests --enable-mpitests=no</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
1. For vanilla Linux kernel 5.4.279:</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
During compilation, we encounter the following errors:</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
=====================================================================</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
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 class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
=====================================================================</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
After debug, we have to add the following code:</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
=====================================================================</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
// In the beginning of the source file, and after all the #include files.</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
#ifndef HAVE_KFREE_SENSITIVE<br>
#define kfree_sensitive(x) kzfree(x)<br>
#endif</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
=====================================================================</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
into the following source files:</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
- lustre-2.7.0/libcfs/libcfs/crypto/keyring.c</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
- lustre-2.7.0/libcfs/libcfs/crypto/keysetup_v1.c</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
to work around this problem, since kfree_sensitive() seems not available in vanilla Linux kernel 5.4.X.</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
2. For vanilla Linux kernel 5.10.252:</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
During compilation, we encounter the following errors:</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
=====================================================================</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
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 class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
=====================================================================</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
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 class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
=====================================================================</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
#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 class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
#endif</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
=====================================================================</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
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 class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
3. For vanilla Linux kernel 5.15.202:</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
Lustre-2.17.0 can be built successfully. However, when loading lustre modules:</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
modprobe lustre</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
modprobe lnet</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
Both command encountered the following error message in dmesg:</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
=====================================================================</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
lustre_symbols_init: error -38<br>
LNetError: 85487:0:(module.c:664:libcfs_init()) cfs_arch_init: error -38</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
=====================================================================</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
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 class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
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 class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
<br>
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
Best Regards,</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="direction: ltr;">
T.H.Hsieh</div>
</div>
</body>
</html>