aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev_indirect.c
diff options
context:
space:
mode:
authorTom Caputi <[email protected]>2018-10-18 16:53:27 -0400
committerBrian Behlendorf <[email protected]>2018-10-24 14:37:31 -0700
commit4a7eb69a5ab0027a0f347a0cdd37b0275fcfecad (patch)
tree1445bbd1acde6e39fd6d4191af9a2e92b282d59f /module/zfs/vdev_indirect.c
parent5e0bd0ae056e26de36dee3c199c6fcff8f14ee15 (diff)
Fix ztest deadman panic with indirect vdev damage
This patch fixes an issue where ztest's deadman thread would trigger a panic because reconstructing artifically damaged blocks would take too long to reconstruct. This patch simply limits how often ztest inflicts split-block damage and how many segments it can damage when it does. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Serapheim Dimitropoulos <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #8010
Diffstat (limited to 'module/zfs/vdev_indirect.c')
-rw-r--r--module/zfs/vdev_indirect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/zfs/vdev_indirect.c b/module/zfs/vdev_indirect.c
index 097be6f0e..7863fe9d0 100644
--- a/module/zfs/vdev_indirect.c
+++ b/module/zfs/vdev_indirect.c
@@ -1614,7 +1614,7 @@ vdev_indirect_splits_damage(indirect_vsd_t *iv, zio_t *zio)
* result in two or less unique copies per indirect_child_t.
* Both may need to be checked in order to reconstruct the block.
* Set iv->iv_attempts_max such that all unique combinations will
- * enumerated, but limit the damage to at most 16 indirect splits.
+ * enumerated, but limit the damage to at most 12 indirect splits.
*/
iv->iv_attempts_max = 1;
@@ -1632,7 +1632,7 @@ vdev_indirect_splits_damage(indirect_vsd_t *iv, zio_t *zio)
}
iv->iv_attempts_max *= 2;
- if (iv->iv_attempts_max > (1ULL << 16)) {
+ if (iv->iv_attempts_max >= (1ULL << 12)) {
iv->iv_attempts_max = UINT64_MAX;
break;
}
@@ -1718,7 +1718,7 @@ vdev_indirect_reconstruct_io_done(zio_t *zio)
/*
* If nonzero, every 1/x blocks will be damaged, in order to validate
* reconstruction when there are split segments with damaged copies.
- * Known_good will TRUE when reconstruction is known to be possible.
+ * Known_good will be TRUE when reconstruction is known to be possible.
*/
if (zfs_reconstruct_indirect_damage_fraction != 0 &&
spa_get_random(zfs_reconstruct_indirect_damage_fraction) == 0)