[LU-13581] LU-9859 libcfs: add support for Xarray breaks build on 3.10.0-1062.9.1.el7.x86_64.debug Created: 18/May/20 Updated: 04/Feb/21 Resolved: 05/Jul/20 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.14.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | John Hammond | Assignee: | Shaun Tancheff |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| 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)
^
|
| Comments |
| Comment by James A Simmons [ 19/May/20 ] |
|
Strange this doesn't show up in the linux kernel since it was taken from it. |
| Comment by John Hammond [ 20/May/20 ] |
|
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 |
| Comment by Gerrit Updater [ 22/May/20 ] |
|
James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/38696 |
| Comment by Gerrit Updater [ 23/Jun/20 ] |
|
Shaun Tancheff (shaun.tancheff@hpe.com) uploaded a new patch: https://review.whamcloud.com/39150 |
| Comment by Gerrit Updater [ 05/Jul/20 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39150/ |
| Comment by Peter Jones [ 05/Jul/20 ] |
|
Landed for 2.14 |