[LU-6428] Lustre client Compilation failed build with kernel 3.2 Created: 03/Apr/15  Updated: 23/Jun/16  Resolved: 01/May/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.8.0

Type: Bug Priority: Minor
Reporter: wu libin (Inactive) Assignee: Bob Glossman (Inactive)
Resolution: Fixed Votes: 0
Labels: patch
Environment:

lustre-2.7.51
Ubuntu 12.04
Kernel Version: kernel 3.2.68


Issue Links:
Related
is related to LU-6215 Sync Lustre external tree with lustre... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

While compiling the Lustre client with newer kernel. It fails with the following error:
Command Used to compile:
./configure
--with-linux=$

{kernel_source_dir}

--with-o2ib=$

{dkms_tree}

/mlnx-ofed-kernel/$

{OFED_VERSION}

/build
--disable-server
--disable-quilt
--disable-dependency-tracking
--disable-doc
--disable-utils
--disable-liblustre
--disable-snmp
--disable-zerocopy
--disable-tests
--enable-quota
make
Error:-
/var/lib/dkms/lustre/2.5.24/build/lustre/llite/dcache.c: In function
'll_invalidate_aliases':
/var/lib/dkms/lustre/2.5.24/build/lustre/llite/dcache.c:302:2: error:
'struct dentry' has no member named 'd_alias'
/var/lib/dkms/lustre/2.5.24/build/lustre/llite/dcache.c:302:2: error:
initialization from incompatible pointer type [-Werror]
/var/lib/dkms/lustre/2.5.24/build/lustre/llite/dcache.c:302:2: error:
'struct dentry' has no member named 'd_alias'
/var/lib/dkms/lustre/2.5.24/build/lustre/llite/dcache.c:302:2: error:
'struct dentry' has no member named 'd_alias'
/var/lib/dkms/lustre/2.5.24/build/lustre/llite/dcache.c:302:2: error:
'struct dentry' has no member named 'd_alias'
/var/lib/dkms/lustre/2.5.24/build/lustre/llite/dcache.c:302:2: error:
'struct dentry' has no member named 'd_alias'
/var/lib/dkms/lustre/2.5.24/build/lustre/llite/dcache.c:302:2: error:
'struct dentry' has no member named 'd_alias'
cc1: all warnings being treated as errors



 Comments   
Comment by Peter Jones [ 03/Apr/15 ]

Hi there

Am I correct in thinking that you are trying to build against IEEL rather than a community version of Lustre? It appears as such so I have moved this issue to the DDN project.

Peter

Comment by wu libin (Inactive) [ 03/Apr/15 ]

Hi, Peter

The problem has been reported here:
https://jira.hpdd.intel.com/browse/DDN-153

I open a new ticket LU-xxxx just because the problem is a general problem also existed on master, so i open a general ticket.

Libin

Comment by Peter Jones [ 03/Apr/15 ]

Libin

Ah ok. Then please can you correct the environment to be more accurate? Presently it says lustre-2.5.24

Thanks

Peter

Comment by Peter Jones [ 03/Apr/15 ]

http://review.whamcloud.com/#/c/14060/

Comment by wu libin (Inactive) [ 03/Apr/15 ]

Peter

Sorry for confusing!
The environment is:
lustre-2.7.51
Ubuntu 12.04
Kernel Version: kernel 3.2.68

I can't change the issue, could you help me?

Thanks

Comment by Peter Jones [ 03/Apr/15 ]

ok done

Comment by wu libin (Inactive) [ 04/Apr/15 ]

Thanks, peter!

Comment by Peter Jones [ 04/Apr/15 ]

Bob

Can you please take care of this patch?

Thanks

Peter

Comment by James A Simmons [ 20/Apr/15 ]

Since I have a test cluster running Ubuntu 14 I also have run into this issue. I found a bug in the current patch. Also for Ubuntu 14 more patches will be needed to make this work. I will push those additional patches under this ticket.

Comment by James A Simmons [ 20/Apr/15 ]

Linking to the upstream work since Ubuntu back ported patches from 3.18 kernels.

Comment by Gerrit Updater [ 20/Apr/15 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: http://review.whamcloud.com/14507
Subject: LU-6426 lustre: remove EIOCBRETRY handling
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 9bcd6b5aca0b14601123a2e024f8c1fb41826505

Comment by Thomas Stibor [ 20/Apr/15 ]

I ran into the same problem with Debian Wheezy 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux and Lustre 2.5.3.90
Is there already a patch for this problem? I did a quick hack:

diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c
index 7ea2f73..b3899a4 100644
--- a/lustre/llite/dcache.c
+++ b/lustre/llite/dcache.c
@@ -299,7 +299,7 @@ void ll_invalidate_aliases(struct inode *inode)
               inode->i_ino, inode->i_generation, inode);
 
        ll_lock_dcache(inode);
-       ll_d_hlist_for_each_entry(dentry, p, &inode->i_dentry, d_alias) {
+       ll_d_hlist_for_each_entry(dentry, p, &inode->i_dentry, d_u.d_alias) {
                CDEBUG(D_DENTRY, "dentry in drop %.*s (%p) parent %p "
                       "inode %p flags %d\n", dentry->d_name.len,
                       dentry->d_name.name, dentry, dentry->d_parent,
diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c
index 4a55d9c..681bad9 100644
--- a/lustre/llite/llite_lib.c
+++ b/lustre/llite/llite_lib.c
@@ -693,7 +693,7 @@ void lustre_dump_dentry(struct dentry *dentry, int recur)
                 return;
 
        list_for_each(tmp, &dentry->d_subdirs) {
-               struct dentry *d = list_entry(tmp, struct dentry, d_u.d_child);
+               struct dentry *d = list_entry(tmp, struct dentry, d_child);
                lustre_dump_dentry(d, recur - 1);
        }
 }
diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c
index 39cd6d5..b6a5d9c 100644
--- a/lustre/llite/namei.c
+++ b/lustre/llite/namei.c
@@ -178,14 +178,14 @@ static void ll_invalidate_negative_children(struct inode *dir)
        DECLARE_LL_D_HLIST_NODE_PTR(p);
 
        ll_lock_dcache(dir);
-       ll_d_hlist_for_each_entry(dentry, p, &dir->i_dentry, d_alias) {
+       ll_d_hlist_for_each_entry(dentry, p, &dir->i_dentry, d_u.d_alias) {
                spin_lock(&dentry->d_lock);
                if (!list_empty(&dentry->d_subdirs)) {
                        struct dentry *child;
 
                        list_for_each_entry_safe(child, tmp_subdir,
                                                 &dentry->d_subdirs,
-                                                d_u.d_child) {
+                                                d_child) {
                                if (child->d_inode == NULL)
                                        d_lustre_invalidate(child, 1);
                        }
@@ -376,7 +376,7 @@ static struct dentry *ll_find_alias(struct inode *inode, struct dentry *dentry)
        discon_alias = invalid_alias = NULL;
 
        ll_lock_dcache(inode);
-       ll_d_hlist_for_each_entry(alias, p, &inode->i_dentry, d_alias) {
+       ll_d_hlist_for_each_entry(alias, p, &inode->i_dentry, d_u.d_alias) {
                LASSERT(alias != dentry);
 
                spin_lock(&alias->d_lock);

If there is a common interest, I can prepare a clean patch for this problem.

Cheers
Thomas

Comment by James A Simmons [ 20/Apr/15 ]

To enable support for Ubuntu 14 you need the two patches posted here;

http://review.whamcloud.com/#/c/14060
http://review.whamcloud.com/#/c/14507

I have tested the patches on Ubuntu 14 and on RHEL6.5. The autoconf had to be reworked since I found Lustre was compiling incorrectly thus I ended up with broken clients.

This by default will over Debian Wheezy support as well.

Comment by Bob Glossman (Inactive) [ 20/Apr/15 ]

Thomas, there is already a fix in flight for the d_child problem. Please see LU-6426; http://review.whamcloud.com/#/c/14060

Comment by Thomas Stibor [ 20/Apr/15 ]

Ok, perfekt. I will try these patches on Wheezy + Lustre 2.5.3.90.
Many thanks, Thomas

Comment by James A Simmons [ 24/Apr/15 ]

I updated to the patch to handle the debian Wheezy 3.2 kernels now. I have tested the latest patch on:

RHEL6.5
RHEL7.1
debian Wheezy/Jesse running a 3.2 kernel
Ubuntu 14.04 - linux-headers-3.11-32-generic
linux-headers-3.11-39-generic (yes d_alias changed between each ubuntu kernel)
SLES11 SP3
Linux 4.0 kernel

Each of those cases correctly compiled lustre.

Comment by Gerrit Updater [ 01/May/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/14060/
Subject: LU-6428 llite: Add check of d_alias and d_child
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 1a14c28cb1136f1f67fdb14e848b2d461b26f941

Comment by Peter Jones [ 01/May/15 ]

Landed for 2.8

Comment by Gerrit Updater [ 08/May/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/14507/
Subject: LU-6426 lustre: remove EIOCBRETRY handling
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 617a53daff1768d88f694ae349214d5c6606d3cf

Generated at Sat Feb 10 02:00:08 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.