[LU-16791] Modern ZFS constified nvlist* functions breaking zfs_[gs]et_prop_* Created: 01/May/23 Updated: 21/Jan/24 Resolved: 18/Jan/24 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.16.0 |
| Fix Version/s: | Lustre 2.16.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oleg Drokin | Assignee: | Oleg Drokin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | LTS15, lug23dd | ||
| Issue Links: |
|
||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
When trying to build lustre against zfs master tree we get this: libmount_utils_zfs.c: In function 'zfs_get_prop_int': libmount_utils_zfs.c:491:51: error: passing argument 3 of 'nvlist_lookup_string' from incompatible pointer type [-Werror=incompatible-pointer-types] ret = nvlist_lookup_string(propval, ZPROP_VALUE, &propstr); ^~~~~~~~ and related |
| Comments |
| Comment by Gerrit Updater [ 01/May/23 ] |
|
"Oleg Drokin <green@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50824 |
| Comment by Gerrit Updater [ 26/Sep/23 ] |
|
"Brian Atkinson <batkinson@lanl.gov>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52519 |
| Comment by Akash B [ 09/Jan/24 ] |
|
On the latest lustre-release code along with this patch, the build fails due to `arc_prune_func_t` changes: /root/akash/akash/build/lustre-release/lustre/osd-zfs/osd_handler.c: In function 'osd_objset_register_callbacks': /root/akash/akash/build/lustre-release/lustre/osd-zfs/osd_handler.c:915:50: error: passing argument 1 of 'arc_add_prune_callback' from incompatible pointer type [-Werror=incompatible-pointer-types] 915 | o->arc_prune_cb = arc_add_prune_callback(arc_prune_func, o); | ^~~~~~~~~~~~~~ | | | void (*)(int64_t, void *) {aka void (*)(long long int, void *)} In file included from /root/akash/akash/build/lustre-release/lustre/osd-zfs/osd_internal.h:51, from /root/akash/akash/build/lustre-release/lustre/osd-zfs/osd_handler.c:51: /usr/src/zfs-2.2.2/include/sys/arc.h:310:55: note: expected 'void (*)(uint64_t, void *)' {aka 'void (*)(long long unsigned int, void *)'} but argument is of type 'void (*)(int64_t, void *)' {aka 'void (*)(long long int, void *)'} 310 | arc_prune_t *arc_add_prune_callback(arc_prune_func_t *func, void *priv); | ~~~~~~~~~~~~~~~~~~^~~~ cc1: all warnings being treated as errors make[6]: *** [scripts/Makefile.build:321: /root/akash/akash/build/lustre-release/lustre/osd-zfs/osd_handler.o] Error 1 make[6]: *** Waiting for unfinished jobs.... make[5]: *** [scripts/Makefile.build:607: /root/akash/akash/build/lustre-release/lustre/osd-zfs] Error 2 make[4]: *** [scripts/Makefile.build:607: /root/akash/akash/build/lustre-release/lustre] Error 2 make[3]: *** [Makefile:1923: /root/akash/akash/build/lustre-release] Error 2 make[3]: Leaving directory '/usr/src/kernels/5.14.0-284.18.1.x7.0.000.9.x86_64' make[2]: *** [autoMakefile:1200: modules] Error 2 make[2]: Leaving directory '/root/akash/akash/build/lustre-release' make[1]: *** [autoMakefile:711: all-recursive] Error 1 make[1]: Leaving directory '/root/akash/akash/build/lustre-release' make: *** [autoMakefile:571: all] Error 2 Build failure seems to be due to the changes to `arc_prune_func_t` from the following commit from OpenZFS: commit 3ec4ea68d491a82c8de3360d50032bdecd53608f Date: Mon Oct 30 19:56:04 2023 -0400 Unify arc_prune_async() code Closes #15456 ... - typedef void arc_prune_func_t(int64_t bytes, void *priv); + typedef void arc_prune_func_t(uint64_t bytes, void *priv); ... |
| Comment by Gerrit Updater [ 18/Jan/24 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52519/ |
| Comment by Peter Jones [ 18/Jan/24 ] |
|
Landed for 2.16 |
| Comment by Akash B [ 19/Jan/24 ] |
|
Can we check if openzfs (zfs-2.2-release and master) builds on the latest lustre-release code along with this patch, and see if there are any failures due to `arc_prune_func_t` changes? |
| Comment by Akash B [ 21/Jan/24 ] |
|
There are build failures when it's built against ZFS (master and zfs-2.2-release) builds even after landing |