libspl: add API for manipulating tunables

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:32:44 +10:00
committed by Brian Behlendorf
parent 967ce75669
commit cb9742e532
5 changed files with 843 additions and 18 deletions
+8
View File
@@ -49,4 +49,12 @@ 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);
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);
#endif