aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/ztest/ztest.c2
-rw-r--r--module/zfs/metaslab.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index 03c62fc6f..1ad87bb30 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -201,7 +201,7 @@ static const ztest_shared_opts_t ztest_opts_defaults = {
.zo_init = 1,
.zo_time = 300, /* 5 minutes */
.zo_maxloops = 50, /* max loops during spa_freeze() */
- .zo_metaslab_force_ganging = 32 << 10,
+ .zo_metaslab_force_ganging = 64 << 10,
.zo_special_vdevs = ZTEST_VDEV_CLASS_RND,
};
diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c
index 616a89507..4b5baf6a6 100644
--- a/module/zfs/metaslab.c
+++ b/module/zfs/metaslab.c
@@ -3309,9 +3309,12 @@ metaslab_alloc_dva(spa_t *spa, metaslab_class_t *mc, uint64_t psize,
/*
* For testing, make some blocks above a certain size be gang blocks.
- * This will also test spilling from special to normal.
+ * This will result in more split blocks when using device removal,
+ * and a large number of split blocks coupled with ztest-induced
+ * damage can result in extremely long reconstruction times. This
+ * will also test spilling from special to normal.
*/
- if (psize >= metaslab_force_ganging && (ddi_get_lbolt() & 3) == 0) {
+ if (psize >= metaslab_force_ganging && (spa_get_random(100) < 3)) {
metaslab_trace_add(zal, NULL, NULL, psize, d, TRACE_FORCE_GANG,
allocator);
return (SET_ERROR(ENOSPC));