summaryrefslogtreecommitdiffstats
path: root/module/zfs/metaslab.c
diff options
context:
space:
mode:
authorMatt Ahrens <[email protected]>2017-07-24 11:07:39 -0700
committerBrian Behlendorf <[email protected]>2018-04-17 10:44:50 -0700
commitd830d4795a210b5ba85482fe26909e64857af763 (patch)
tree421469ce7ca41ab3078290cd581fa9e8cac877a8 /module/zfs/metaslab.c
parentd68ac65eb61acfd898262709a726bbcd7f5a31f1 (diff)
OpenZFS 9280 - Assertion failure while running removal_with_ganging test with 4K devices
Authored by: Matt Ahrens <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: John Kennedy <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Approved by: Garrett D'Amore <[email protected]> Ported-by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/9280 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/243952c Closes #7445
Diffstat (limited to 'module/zfs/metaslab.c')
-rw-r--r--module/zfs/metaslab.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c
index 52a60cc5e..ae98c5143 100644
--- a/module/zfs/metaslab.c
+++ b/module/zfs/metaslab.c
@@ -48,8 +48,10 @@
*/
unsigned long metaslab_aliquot = 512 << 10;
-/* force gang blocks */
-unsigned long metaslab_gang_bang = SPA_MAXBLOCKSIZE + 1;
+/*
+ * For testing, make some blocks above a certain size be gang blocks.
+ */
+unsigned long metaslab_force_ganging = SPA_MAXBLOCKSIZE + 1;
/*
* The in-core space map representation is more compact than its on-disk form.
@@ -2952,7 +2954,7 @@ 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.
*/
- if (psize >= metaslab_gang_bang && (ddi_get_lbolt() & 3) == 0) {
+ if (psize >= metaslab_force_ganging && (ddi_get_lbolt() & 3) == 0) {
metaslab_trace_add(zal, NULL, NULL, psize, d, TRACE_FORCE_GANG);
return (SET_ERROR(ENOSPC));
}
@@ -3900,7 +3902,7 @@ MODULE_PARM_DESC(zfs_metaslab_switch_threshold,
"segment-based metaslab selection maximum buckets before switching");
/* CSTYLED */
-module_param(metaslab_gang_bang, ulong, 0644);
-MODULE_PARM_DESC(metaslab_gang_bang,
+module_param(metaslab_force_ganging, ulong, 0644);
+MODULE_PARM_DESC(metaslab_force_ganging,
"blocks larger than this size are forced to be gang blocks");
#endif /* _KERNEL && HAVE_SPL */