* 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);
* 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;
}
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;
}
/*
* 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)