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
@@ -20,6 +20,7 @@ libspl_la_SOURCES = \
%D%/strlcat.c \
%D%/strlcpy.c \
%D%/timestamp.c \
%D%/tunables.c \
%D%/include/sys/list.h \
%D%/include/sys/list_impl.h