aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/ztest
diff options
context:
space:
mode:
authorSerapheim Dimitropoulos <[email protected]>2020-06-22 09:48:36 -0700
committerGitHub <[email protected]>2020-06-22 09:48:36 -0700
commit42d8d1d66ac1d3629ab22f65cd0787933cfb60ab (patch)
treefc4976518fff2b778736d475bfe4d0ba178bdd7e /cmd/ztest
parent540493ba4f92df1cd3aa18336734cc07702b8bfb (diff)
Remove unnecessary terminology from error-injection in ztest
Rephrase error-injection comment in ztest to be more clear. Reviewed-by: Matt Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed by: Sara Hartse <[email protected]> Signed-off-by: Serapheim Dimitropoulos <[email protected]> Closes #10482
Diffstat (limited to 'cmd/ztest')
-rw-r--r--cmd/ztest/ztest.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index dd5bf9894..ce748da18 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -5924,24 +5924,26 @@ ztest_fault_inject(ztest_ds_t *zd, uint64_t id)
* on two different leaf devices, because ZFS can not
* tolerate that (if maxfaults==1).
*
- * We divide each leaf into chunks of size
- * (# leaves * SPA_MAXBLOCKSIZE * 4). Within each chunk
- * there is a series of ranges to which we can inject errors.
- * Each range can accept errors on only a single leaf vdev.
- * The error injection ranges are separated by ranges
- * which we will not inject errors on any device (DMZs).
- * Each DMZ must be large enough such that a single block
- * can not straddle it, so that a single block can not be
- * a target in two different injection ranges (on different
- * leaf vdevs).
+ * To achieve this we divide each leaf device into
+ * chunks of size (# leaves * SPA_MAXBLOCKSIZE * 4).
+ * Each chunk is further divided into error-injection
+ * ranges (can accept errors) and clear ranges (we do
+ * not inject errors in those). Each error-injection
+ * range can accept errors only for a single leaf vdev.
+ * Error-injection ranges are separated by clear ranges.
*
* For example, with 3 leaves, each chunk looks like:
* 0 to 32M: injection range for leaf 0
- * 32M to 64M: DMZ - no injection allowed
+ * 32M to 64M: clear range - no injection allowed
* 64M to 96M: injection range for leaf 1
- * 96M to 128M: DMZ - no injection allowed
+ * 96M to 128M: clear range - no injection allowed
* 128M to 160M: injection range for leaf 2
- * 160M to 192M: DMZ - no injection allowed
+ * 160M to 192M: clear range - no injection allowed
+ *
+ * Each clear range must be large enough such that a
+ * single block cannot straddle it. This way a block
+ * can't be a target in two different injection ranges
+ * (on different leaf vdevs).
*/
offset = ztest_random(fsize / (leaves << bshift)) *
(leaves << bshift) + (leaf << bshift) +