From 5714090fb9a17d10df9c5a6eaae1cf59efd5656a Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 11 Nov 2025 17:11:54 -0800 Subject: [PATCH] libspl: hide zfs_tunable_* symbols The zfs_tunable_* functions are a public interface which are part of the internal libspl convenience library. They should be hidden to prevent an unnecessary ABI change in installed libraries which link against libspl (e.g. libzfs_core, libuutil). We do already leak long standing libspl symbols. This commit is solely intended to prevent leaking these new ones until this is properly sorted out. Reviewed-by: Rob Norris Signed-off-by: Brian Behlendorf Closes #17911 --- lib/libspl/include/sys/tunables.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/libspl/include/sys/tunables.h b/lib/libspl/include/sys/tunables.h index 5d9bb3d71..c85400f6f 100644 --- a/lib/libspl/include/sys/tunables.h +++ b/lib/libspl/include/sys/tunables.h @@ -25,7 +25,7 @@ */ #ifndef _SYS_TUNABLES_H -#define _SYS_TUNABLES_H +#define _SYS_TUNABLES_H extern __attribute__((visibility("hidden"))) typedef enum { ZFS_TUNABLE_TYPE_INT, @@ -49,12 +49,14 @@ typedef struct zfs_tunable { const char *zt_desc; } zfs_tunable_t; -int zfs_tunable_set(const zfs_tunable_t *tunable, const char *val); -int zfs_tunable_get(const zfs_tunable_t *tunable, char *val, size_t valsz); +_SYS_TUNABLES_H int zfs_tunable_set(const zfs_tunable_t *tunable, + const char *val); +_SYS_TUNABLES_H int zfs_tunable_get(const zfs_tunable_t *tunable, char *val, + size_t valsz); -const zfs_tunable_t *zfs_tunable_lookup(const char *name); +_SYS_TUNABLES_H const zfs_tunable_t *zfs_tunable_lookup(const char *name); typedef int (*zfs_tunable_iter_t)(const zfs_tunable_t *tunable, void *arg); -void zfs_tunable_iter(zfs_tunable_iter_t cb, void *arg); +_SYS_TUNABLES_H void zfs_tunable_iter(zfs_tunable_iter_t cb, void *arg); #endif