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

LU-9859 libcfs: add support for Xarray breaks build on 3.10.0-1062.9.1.el7.x86_64.debug

Details

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

    Description

      When lockdep is enabled, the Xarray header cannot be compiled due to const qualification errors:

        CC [M]  /root/lustre-release/libcfs/libcfs/linux/xarray.o
      In file included from /root/lustre-release/libcfs/libcfs/linux/xarray.c:19:0:
      /root/lustre-release/libcfs/include/libcfs/linux/xarray.h: In function ‘xa_head’:
      /root/lustre-release/libcfs/include/libcfs/linux/xarray.h:1135:2: error: passing argument 1 of ‘lock_is_held’ discards ‘const’ qualifier from pointer target type [-Werror]
        return rcu_dereference_check(xa->xa_head,
        ^
      In file included from include/linux/spinlock_types.h:18:0,
                       from include/linux/spinlock.h:81,
                       from include/linux/mmzone.h:7,
                       from include/linux/gfp.h:5,
                       from include/linux/slab.h:12,
                       from /root/lustre-release/libcfs/libcfs/linux/xarray.c:17:
      include/linux/lockdep.h:340:19: note: expected ‘struct lockdep_map *’ but argument is of type ‘const struct lockdep_map *’
       static inline int lock_is_held(struct lockdep_map *lock)
                         ^
      

      Attachments

        Activity

          [LU-13581] LU-9859 libcfs: add support for Xarray breaks build on 3.10.0-1062.9.1.el7.x86_64.debug
          pjones Peter Jones added a comment -

          Landed for 2.14

          pjones Peter Jones added a comment - Landed for 2.14

          Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39150/
          Subject: LU-13581 build: xarray and lockdep_is_held const clash
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 3fcceea0e301c51a29d641c287bd36302a706bbe

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39150/ Subject: LU-13581 build: xarray and lockdep_is_held const clash Project: fs/lustre-release Branch: master Current Patch Set: Commit: 3fcceea0e301c51a29d641c287bd36302a706bbe

          Shaun Tancheff (shaun.tancheff@hpe.com) uploaded a new patch: https://review.whamcloud.com/39150
          Subject: LU-13581 build: xarray and lockdep_is_held const clash
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 1902c60cf81363fb6635f4f5729d0874581e1b75

          gerrit Gerrit Updater added a comment - Shaun Tancheff (shaun.tancheff@hpe.com) uploaded a new patch: https://review.whamcloud.com/39150 Subject: LU-13581 build: xarray and lockdep_is_held const clash Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 1902c60cf81363fb6635f4f5729d0874581e1b75

          James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/38696
          Subject: LU-13581 libcfs: fixup Xarray support
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: afc399c9aa540928f755fb8a21455c51bb7bf353

          gerrit Gerrit Updater added a comment - James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/38696 Subject: LU-13581 libcfs: fixup Xarray support Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: afc399c9aa540928f755fb8a21455c51bb7bf353
          jhammond John Hammond added a comment -

          The signature of the lockdep functions changed sometime between 3.10 and 5.2. See https://elixir.bootlin.com/linux/v5.2-rc2/source/include/linux/lockdep.h#L354

          jhammond John Hammond added a comment - The signature of the lockdep functions changed sometime between 3.10 and 5.2. See https://elixir.bootlin.com/linux/v5.2-rc2/source/include/linux/lockdep.h#L354

          Strange this doesn't show up in the linux kernel since it was taken from it.

          simmonsja James A Simmons added a comment - Strange this doesn't show up in the linux kernel since it was taken from it.

          People

            stancheff Shaun Tancheff
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: