libspl: implement ZFS_MODULE_PARAM for userspace

For each tunable declaration, we create a zfs_tunable_t with its
details, and then a pointer to it in the 'zfs_tunables' ELF section,
that we can access later with a little support from the linker.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #17537
This commit is contained in:
Rob Norris
2025-07-12 11:31:17 +10:00
committed by Brian Behlendorf
parent 3a494c6d2a
commit 967ce75669
5 changed files with 144 additions and 1 deletions
+1
View File
@@ -59,6 +59,7 @@ libspl_sys_HEADERS = \
%D%/sys/time.h \
%D%/sys/trace_spl.h \
%D%/sys/trace_zfs.h \
%D%/sys/tunables.h \
%D%/sys/types.h \
%D%/sys/types32.h \
%D%/sys/uio.h \