summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorTom Caputi <[email protected]>2018-12-05 12:30:28 -0500
committerBrian Behlendorf <[email protected]>2018-12-05 09:30:28 -0800
commite3c85c0938c5d878927fcb812792b68fd056b188 (patch)
tree9eed749f868ee461fb5b218017aa768bc5216be8 /cmd
parent78e21394679ed7435f9b0d10a56ce4f679c680fe (diff)
Move assert in dump_dir() in zdb
This one line patch moves an assert in the function dump_dir() below an error check that ensures it ran correctly. This ensures zdb dumps the error that actually caused the problem, as opposed to one of its symptoms. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #8171
Diffstat (limited to 'cmd')
-rw-r--r--cmd/zdb/zdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
index 52a671557..1a9303d12 100644
--- a/cmd/zdb/zdb.c
+++ b/cmd/zdb/zdb.c
@@ -2522,15 +2522,15 @@ dump_dir(objset_t *os)
(void) printf("\tPercent empty: %10lf\n",
(double)(max_slot_used - total_slots_used)*100 /
(double)max_slot_used);
-
- ASSERT3U(object_count, ==, usedobjs);
-
(void) printf("\n");
if (error != ESRCH) {
(void) fprintf(stderr, "dmu_object_next() = %d\n", error);
abort();
}
+
+ ASSERT3U(object_count, ==, usedobjs);
+
if (leaked_objects != 0) {
(void) printf("%d potentially leaked objects detected\n",
leaked_objects);