From dc1fbc43be19d69a39b3e5374b106d6b0474958f Mon Sep 17 00:00:00 2001 From: George Melikov Date: Thu, 26 Jan 2017 23:32:36 +0300 Subject: [PATCH] OpenZFS 7253 - ztest failure: dsl_destroy_head(name) == 0 (0x10 == 0x0), file ../ztest.c, line 3235 (#5660) Authored by: Chris Williamson Reviewed by: - Matthew Ahrens Reviewed by: - Paul Dagnelie Approved by: - Robert Mustacchi Reviewed-by: Brian Behlendorf Reviewed-by: Giuseppe Di Natale Ported-by: George Melikov OpenZFS-issue: https://www.illumos.org/issues/7253 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/754998c Closes #5660 --- cmd/ztest/ztest.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c index 8d5ee0bad..3b504e791 100644 --- a/cmd/ztest/ztest.c +++ b/cmd/ztest/ztest.c @@ -3499,9 +3499,12 @@ ztest_objset_destroy_cb(const char *name, void *arg) * Destroy the dataset. */ if (strchr(name, '@') != NULL) { - VERIFY0(dsl_destroy_snapshot(name, B_FALSE)); + VERIFY0(dsl_destroy_snapshot(name, B_TRUE)); } else { - VERIFY0(dsl_destroy_head(name)); + error = dsl_destroy_head(name); + /* There could be a hold on this dataset */ + if (error != EBUSY) + ASSERT0(error); } return (0); }