aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/ztest
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 /cmd/ztest
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 'cmd/ztest')
-rw-r--r--cmd/ztest/ztest.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index 44d4e9740..983bc0dfe 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -7383,8 +7383,13 @@ main(int argc, char **argv)
* Verify that even extensively damaged split blocks with many
* segments can be reconstructed in a reasonable amount of time
* when reconstruction is known to be possible.
+ *
+ * Note: the lower this value is, the more damage we inflict, and
+ * the more time ztest spends in recovering that damage. We chose
+ * to induce damage 1/100th of the time so recovery is tested but
+ * not so frequently that ztest doesn't get to test other code paths.
*/
- zfs_reconstruct_indirect_damage_fraction = 4;
+ zfs_reconstruct_indirect_damage_fraction = 100;
action.sa_handler = sig_handler;
sigemptyset(&action.sa_mask);