]> git.proxmox.com Git - mirror_zfs.git/blobdiff - tests/zfs-tests/tests/functional/trim/autotrim_config.ksh
Distributed Spare (dRAID) Feature
[mirror_zfs.git] / tests / zfs-tests / tests / functional / trim / autotrim_config.ksh
index d48ee45d03b167937f9ca87e219dd0c38a165d2b..924b56935defd36dad1609eaa1862e4bd4346449 100755 (executable)
@@ -70,14 +70,20 @@ log_must set_tunable64 VDEV_MIN_MS_COUNT 32
 typeset VDEV_MAX_MB=$(( floor(4 * MINVDEVSIZE * 0.75 / 1024 / 1024) ))
 typeset VDEV_MIN_MB=$(( floor(4 * MINVDEVSIZE * 0.30 / 1024 / 1024) ))
 
-for type in "" "mirror" "raidz2"; do
+for type in "" "mirror" "raidz2" "draid"; do
 
        if [[ "$type" = "" ]]; then
                VDEVS="$TRIM_VDEV1"
        elif [[ "$type" = "mirror" ]]; then
                VDEVS="$TRIM_VDEV1 $TRIM_VDEV2"
-       else
+       elif [[ "$type" = "raidz2" ]]; then
                VDEVS="$TRIM_VDEV1 $TRIM_VDEV2 $TRIM_VDEV3"
+       elif [[ "$type" = "draid" ]]; then
+               VDEVS="$TRIM_VDEV1 $TRIM_VDEV2 $TRIM_VDEV3 $TRIM_VDEV4"
+
+               # The per-vdev utilization is lower due to the capacity
+               # resilverd for the distributed spare.
+               VDEV_MAX_MB=$(( floor(4 * MINVDEVSIZE * 0.50 / 1024 / 1024) ))
        fi
 
        log_must truncate -s $((4 * MINVDEVSIZE)) $VDEVS