diff options
Diffstat (limited to 'cmd/zdb')
-rw-r--r-- | cmd/zdb/zdb.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 69001071d..1415be864 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -4542,6 +4542,8 @@ main(int argc, char **argv) } } else { error = open_objset(target, DMU_OST_ANY, FTAG, &os); + if (error == 0) + spa = dmu_objset_spa(os); } } nvlist_free(policy); @@ -4549,6 +4551,14 @@ main(int argc, char **argv) if (error) fatal("can't open '%s': %s", target, strerror(error)); + /* + * Set the pool failure mode to panic in order to prevent the pool + * from suspending. A suspended I/O will have no way to resume and + * can prevent the zdb(8) command from terminating as expected. + */ + if (spa != NULL) + spa->spa_failmode = ZIO_FAILURE_MODE_PANIC; + argv++; argc--; if (!dump_opt['R']) { |