[LU-17421] Lustre master build failure with ZFS 2.2.1 Created: 12/Jan/24  Updated: 12/Jan/24

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Brian Atkinson Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 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);

              ^~~~~~~~~~~~~~~~~~~~~~



 Comments   
Comment by Gerrit Updater [ 12/Jan/24 ]

"Brian Atkinson <batkinson@lanl.gov>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53664
Subject: LU-17421 build: Update check for arc_prune_func_t parameters
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 5e5e9f3bac4ec0e6568371f1843515c086c47d39

Generated at Sat Feb 10 03:35:18 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.