From 3ea8ca8c0f955a99ac87eb01a7201114a2d5f15f Mon Sep 17 00:00:00 2001 From: Shreshth3 <66148173+Shreshth3@users.noreply.github.com> Date: Mon, 20 Oct 2025 06:30:20 -0700 Subject: [PATCH] zdb: fix bug with -A flag Fixes #10544. According to the manpage, zdb -A should ignore all assertions. But it currently does not do that. This commit fixes this bug. Signed-off-by: Shreshth Srivastava Reviewed-by: Rob Norris Reviewed-by: Alexander Motin Closes #17825 --- cmd/zdb/zdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 1ffb8ebc7..2560ad045 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -9747,6 +9747,9 @@ main(int argc, char **argv) */ spa_mode_readable_spacemaps = B_TRUE; + libspl_set_assert_ok((dump_opt['A'] == 1) || (dump_opt['A'] > 2)); + zfs_recover = (dump_opt['A'] > 1); + if (dump_all) verbose = MAX(verbose, 1); @@ -9757,9 +9760,6 @@ main(int argc, char **argv) dump_opt[c] += verbose; } - libspl_set_assert_ok((dump_opt['A'] == 1) || (dump_opt['A'] > 2)); - zfs_recover = (dump_opt['A'] > 1); - argc -= optind; argv += optind; if (argc < 2 && dump_opt['R'])