libzpool: tunable-based option interface for zdb/ztest

Removes the old dlsym() based option setter and adds a new
function handle_tunable_option() that can set, get and list all the
tunables in the system. And then wire it up to zdb and ztest.

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:33:19 +10:00
committed by Brian Behlendorf
parent cb9742e532
commit fce18e04d5
7 changed files with 133 additions and 102 deletions
+1 -1
View File
@@ -661,7 +661,7 @@ extern void random_fini(void);
struct spa;
extern void show_pool_stats(struct spa *);
extern int set_global_var(char const *arg);
extern int handle_tunable_option(const char *, boolean_t);
typedef struct callb_cpr {
kmutex_t *cc_lockp;