Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-6428

Lustre client Compilation failed build with kernel 3.2

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.8.0
    • None
    • lustre-2.7.51
      Ubuntu 12.04
      Kernel Version: kernel 3.2.68
    • 3
    • 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

      Attachments

        Issue Links

          Activity

            [LU-6428] Lustre client Compilation failed build with kernel 3.2

            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

            gerrit Gerrit Updater added a comment - 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
            pjones Peter Jones added a comment -

            Landed for 2.8

            pjones Peter Jones added a comment - Landed for 2.8

            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

            gerrit Gerrit Updater added a comment - 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
            simmonsja James A Simmons added a comment - - edited

            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.

            simmonsja James A Simmons added a comment - - edited 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.

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

            thomas.stibor Thomas Stibor added a comment - Ok, perfekt. I will try these patches on Wheezy + Lustre 2.5.3.90. Many thanks, Thomas

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

            bogl Bob Glossman (Inactive) added a comment - Thomas, there is already a fix in flight for the d_child problem. Please see LU-6426 ; http://review.whamcloud.com/#/c/14060
            simmonsja James A Simmons added a comment - - edited

            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.

            simmonsja James A Simmons added a comment - - edited 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.
            thomas.stibor Thomas Stibor added a comment - - edited

            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

            thomas.stibor Thomas Stibor added a comment - - edited 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

            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

            gerrit Gerrit Updater added a comment - 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

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

            simmonsja James A Simmons added a comment - Linking to the upstream work since Ubuntu back ported patches from 3.18 kernels.

            People

              bogl Bob Glossman (Inactive)
              gnlwlb wu libin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: