mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 03:19:35 +03:00
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
This commit is contained in:
parent
98d07d5798
commit
0dd6b6bfcb
@ -3980,10 +3980,14 @@ ztest_objset_destroy_cb(const char *name, void *arg)
|
|||||||
VERIFY0(dsl_destroy_snapshot(name, B_TRUE));
|
VERIFY0(dsl_destroy_snapshot(name, B_TRUE));
|
||||||
} else {
|
} else {
|
||||||
error = dsl_destroy_head(name);
|
error = dsl_destroy_head(name);
|
||||||
|
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 */
|
/* There could be a hold on this dataset */
|
||||||
if (error != EBUSY)
|
|
||||||
ASSERT0(error);
|
ASSERT0(error);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user