mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
Remove unnecessary terminology from error-injection in ztest
Rephrase error-injection comment in ztest to be more clear. Reviewed-by: Matt Ahrens <matt@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed by: Sara Hartse <sara.hartse@delphix.com> Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com> Closes #10482
This commit is contained in:
parent
540493ba4f
commit
42d8d1d66a
@ -5924,24 +5924,26 @@ ztest_fault_inject(ztest_ds_t *zd, uint64_t id)
|
|||||||
* on two different leaf devices, because ZFS can not
|
* on two different leaf devices, because ZFS can not
|
||||||
* tolerate that (if maxfaults==1).
|
* tolerate that (if maxfaults==1).
|
||||||
*
|
*
|
||||||
* We divide each leaf into chunks of size
|
* To achieve this we divide each leaf device into
|
||||||
* (# leaves * SPA_MAXBLOCKSIZE * 4). Within each chunk
|
* chunks of size (# leaves * SPA_MAXBLOCKSIZE * 4).
|
||||||
* there is a series of ranges to which we can inject errors.
|
* Each chunk is further divided into error-injection
|
||||||
* Each range can accept errors on only a single leaf vdev.
|
* ranges (can accept errors) and clear ranges (we do
|
||||||
* The error injection ranges are separated by ranges
|
* not inject errors in those). Each error-injection
|
||||||
* which we will not inject errors on any device (DMZs).
|
* range can accept errors only for a single leaf vdev.
|
||||||
* Each DMZ must be large enough such that a single block
|
* Error-injection ranges are separated by clear ranges.
|
||||||
* can not straddle it, so that a single block can not be
|
|
||||||
* a target in two different injection ranges (on different
|
|
||||||
* leaf vdevs).
|
|
||||||
*
|
*
|
||||||
* For example, with 3 leaves, each chunk looks like:
|
* For example, with 3 leaves, each chunk looks like:
|
||||||
* 0 to 32M: injection range for leaf 0
|
* 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
|
* 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
|
* 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)) *
|
offset = ztest_random(fsize / (leaves << bshift)) *
|
||||||
(leaves << bshift) + (leaf << bshift) +
|
(leaves << bshift) + (leaf << bshift) +
|
||||||
|
Loading…
Reference in New Issue
Block a user