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

Mellanox backport header (kthread.h) conflicts with newer kernels

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.8.0
    • None
    • 3
    • 9223372036854775807

    Description

      This is very similar to LU-5140, except the conflict is in kthread.h

      [  224s] In file included from /usr/src/packages/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.h:44,
      [  224s]                  from /usr/src/packages/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.c:42:
      [  224s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:21: error: redefinition of typedef 'kthread_work_func_t'
      [  224s] /usr/src/linux-3.0.101-0.46.1_1.0000.8764/include/linux/kthread.h:55: error: previous declaration of 'kthread_work_func_t' was here
      [  224s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:23: error: redefinition of 'struct kthread_worker'
      [  224s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:29: error: redefinition of 'struct kthread_work'
      [  224s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:75: error: conflicting types for '__init_kthread_worker'
      [  224s] /usr/src/linux-3.0.101-0.46.1_1.0000.8764/include/linux/kthread.h:109: error: previous declaration of '__init_kthread_worker' was here
      [  224s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:94: error: conflicting types for 'queue_kthread_work'
      [  224s] /usr/src/linux-3.0.101-0.46.1_1.0000.8764/include/linux/kthread.h:128: error: previous declaration of 'queue_kthread_work' was here
      [  224s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:96: error: conflicting types for 'flush_kthread_work'
      [  224s] /usr/src/linux-3.0.101-0.46.1_1.0000.8764/include/linux/kthread.h:130: error: previous declaration of 'flush_kthread_work' was here
      [  224s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:97: error: conflicting types for 'flush_kthread_worker'
      [  224s] /usr/src/linux-3.0.101-0.46.1_1.0000.8764/include/linux/kthread.h:131: error: previous declaration of 'flush_kthread_worker' was here
      

      I think we just to test for the kthread code and define CONFIG_COMPAT_IS_KTHREAD as appropriate. I have a patch but might not get around to pushing until Monday.

      Attachments

        Issue Links

          Activity

            [LU-6769] Mellanox backport header (kthread.h) conflicts with newer kernels
            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/15428/
            Subject: LU-6769 build: Test for kthread_worker support
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: b984a7bed4afec88677c89840d85f40b48d14c23

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15428/ Subject: LU-6769 build: Test for kthread_worker support Project: fs/lustre-release Branch: master Current Patch Set: Commit: b984a7bed4afec88677c89840d85f40b48d14c23
            pjones Peter Jones added a comment -

            Amir

            Could you please take care of this patch?

            Thanks

            Peter

            pjones Peter Jones added a comment - Amir Could you please take care of this patch? Thanks Peter

            Chris Horn (hornc@cray.com) uploaded a new patch: http://review.whamcloud.com/15428
            Subject: LU-6769 build: Test for kthread_worker support
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: d3fd0a93347070422f1c02095d86030e2473d7de

            gerrit Gerrit Updater added a comment - Chris Horn (hornc@cray.com) uploaded a new patch: http://review.whamcloud.com/15428 Subject: LU-6769 build: Test for kthread_worker support Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: d3fd0a93347070422f1c02095d86030e2473d7de
            hornc Chris Horn added a comment -

            It does, but if I include your change from LU-6763 then the error shows up elsewhere:

            [  139s] In file included from /usr/src/packages/BUILD/cray-lustre/lnet/include/lnet/lib-types.h:49,
            [  139s]                  from /usr/src/packages/BUILD/cray-lustre/lnet/include/lnet/lib-lnet.h:51,
            [  139s]                  from /usr/src/packages/BUILD/cray-lustre/lnet/lnet/api-ni.c:39:
            [  139s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:21: error: redefinition of typedef 'kthread_work_func_t'
            [  139s] /usr/src/linux-3.0.101-0.46.1_1.0000.8764/include/linux/kthread.h:55: error: previous declaration of 'kthread_work_func_t' was here
            [  139s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:23: error: redefinition of 'struct kthread_worker'
            [  139s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:29: error: redefinition of 'struct kthread_work'
            [  139s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:75: error: conflicting types for '__init_kthread_worker'
            [  139s] /usr/src/linux-3.0.101-0.46.1_1.0000.8764/include/linux/kthread.h:109: error: previous declaration of '__init_kthread_worker' was here
            [  139s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:94: error: conflicting types for 'queue_kthread_work'
            [  139s] /usr/src/linux-3.0.101-0.46.1_1.0000.8764/include/linux/kthread.h:128: error: previous declaration of 'queue_kthread_work' was here
            [  139s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:96: error: conflicting types for 'flush_kthread_work'
            [  139s] /usr/src/linux-3.0.101-0.46.1_1.0000.8764/include/linux/kthread.h:130: error: previous declaration of 'flush_kthread_work' was here
            [  139s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:97: error: conflicting types for 'flush_kthread_worker'
            [  139s] /usr/src/linux-3.0.101-0.46.1_1.0000.8764/include/linux/kthread.h:131: error: previous declaration of 'flush_kthread_worker' was here
            

            If I add a test for this in lustre-lnet.m4, and set:

            EXTRA_OFED_INCLUDE="$EXTRA_OFED_INCLUDE -DCONFIG_COMPAT_IS_KTHREAD"
            

            appropriately then things seem to work.

            hornc Chris Horn added a comment - It does, but if I include your change from LU-6763 then the error shows up elsewhere: [ 139s] In file included from /usr/src/packages/BUILD/cray-lustre/lnet/include/lnet/lib-types.h:49, [ 139s] from /usr/src/packages/BUILD/cray-lustre/lnet/include/lnet/lib-lnet.h:51, [ 139s] from /usr/src/packages/BUILD/cray-lustre/lnet/lnet/api-ni.c:39: [ 139s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:21: error: redefinition of typedef 'kthread_work_func_t' [ 139s] /usr/src/linux-3.0.101-0.46.1_1.0000.8764/include/linux/kthread.h:55: error: previous declaration of 'kthread_work_func_t' was here [ 139s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:23: error: redefinition of 'struct kthread_worker' [ 139s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:29: error: redefinition of 'struct kthread_work' [ 139s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:75: error: conflicting types for '__init_kthread_worker' [ 139s] /usr/src/linux-3.0.101-0.46.1_1.0000.8764/include/linux/kthread.h:109: error: previous declaration of '__init_kthread_worker' was here [ 139s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:94: error: conflicting types for 'queue_kthread_work' [ 139s] /usr/src/linux-3.0.101-0.46.1_1.0000.8764/include/linux/kthread.h:128: error: previous declaration of 'queue_kthread_work' was here [ 139s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:96: error: conflicting types for 'flush_kthread_work' [ 139s] /usr/src/linux-3.0.101-0.46.1_1.0000.8764/include/linux/kthread.h:130: error: previous declaration of 'flush_kthread_work' was here [ 139s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/kthread.h:97: error: conflicting types for 'flush_kthread_worker' [ 139s] /usr/src/linux-3.0.101-0.46.1_1.0000.8764/include/linux/kthread.h:131: error: previous declaration of 'flush_kthread_worker' was here If I add a test for this in lustre-lnet.m4, and set: EXTRA_OFED_INCLUDE="$EXTRA_OFED_INCLUDE -DCONFIG_COMPAT_IS_KTHREAD" appropriately then things seem to work.

            Ugh. Does moving compact-2.6.h to be the first file fix the issue?

            simmonsja James A Simmons added a comment - Ugh. Does moving compact-2.6.h to be the first file fix the issue?

            People

              ashehata Amir Shehata (Inactive)
              hornc Chris Horn
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: