From ef6f261454f82e9137599905a02512ae5640ac58 Mon Sep 17 00:00:00 2001 From: tiehexue Date: Wed, 3 Jun 2026 03:31:31 +0800 Subject: [PATCH] When reading a vdev label skip libzfs_core_init() There's no need to call libzfs_core_init() when `zdb -l` is used to read a vdev label. Reviewed-by: Brian Behlendorf Signed-off-by: tiehexue Closes #18606 --- cmd/zdb/zdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 1dcd70f628b..05e005d929a 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -10230,7 +10230,7 @@ main(int argc, char **argv) * Automate cachefile */ if (!spa_config_path_env && !config_path_console && target && - libzfs_core_init() == 0) { + !dump_opt['l'] && libzfs_core_init() == 0) { char *pname = strdup(target); const char *value; nvlist_t *pnvl = NULL;