aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Behlendorf <behlendorf1@llnl.gov>2018-12-14 18:03:05 +0000
committerGitHub <noreply@github.com>2018-12-14 18:03:05 +0000
commit0dd6b6bfcb2c14249a6d6b874e11ff137777d349 (patch)
tree29d5bc2208b35c0a4b0a309e3e0843d3a04e83c7
parent98d07d5798390bbe3817418db51afa895831e900 (diff)
downloadsrc-0dd6b6bfcb2c14249a6d6b874e11ff137777d349.tar.gz
src-0dd6b6bfcb2c14249a6d6b874e11ff137777d349.zip
ztest: ENOSPC in ztest_objset_destroy_cb()
While unlikely it is possible for dsl_destroy_head() to return ENOSPC in the ztest_objset_destroy_cb(). This can occur even when ZFS_SPACE_CHECK_DESTROY is used with the dsl_sync_task(). Both the existence of a checkpoint and pending deferred frees can cause this. Reviewed-by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com> Reviewed-by: Tom Caputi <tcaputi@datto.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #8206
-rw-r--r--cmd/ztest/ztest.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index c4bcd74fc0d2..28ab0e8469c2 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -3980,9 +3980,13 @@ ztest_objset_destroy_cb(const char *name, void *arg)
VERIFY0(dsl_destroy_snapshot(name, B_TRUE));
} else {
error = dsl_destroy_head(name);
- /* There could be a hold on this dataset */
- if (error != EBUSY)
+ if (error == ENOSPC) {
+ /* There could be checkpoint or insufficient slop */
+ ztest_record_enospc(FTAG);
+ } else if (error != EBUSY) {
+ /* There could be a hold on this dataset */
ASSERT0(error);
+ }
}
return (0);
}