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

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Lustre 2.14.0
    • Labels:
      None
    • Severity:
      3
    • Rank (Obsolete):
      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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: