Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
3
-
9223372036854775807
Description
ZFS 2.2.1 unified the code for arc_prune_async() for both FreeBSD and Linux. As a side effect of this update, the first parameter for the arc_prune_func_t function pointer typedef was changed to an uint64_t. Lustre master fails to build with ZFS 2.2.1 with the following error:
CC [M] /home/brian/lustre/lustre/osd-zfs/osd_handler.o
/home/brian/lustre/lustre/osd-zfs/osd_handler.c: In function ‘osd_objset_register_callbacks’:
/home/brian/lustre/lustre/osd-zfs/osd_handler.c:915:43: error: passing argument 1 of ‘arc_add_prune_callback’ from incompatible pointer type [-Werror=incompatible-pointer-types]
o->arc_prune_cb = arc_add_prune_callback(arc_prune_func, o);
^~~~~~~~~~~~~~
In file included from /home/brian/lustre/lustre/osd-zfs/osd_internal.h:51,
from /home/brian/lustre/lustre/osd-zfs/osd_handler.c:51:
/usr/src/zfs-2.2.1/include/sys/arc.h:310:14: 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 *)’}arc_prune_t *arc_add_prune_callback(arc_prune_func_t *func, void *priv);
^~~~~~~~~~~~~~~~~~~~~~