Skip to content

Commit

Permalink
fixup replacement/resilver_restart_001
Browse files Browse the repository at this point in the history
  • Loading branch information
snajpa committed Jan 25, 2024
1 parent a4ab654 commit b60ccd2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/zfs-tests/include/tunables.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ REBUILD_SCRUB_ENABLED rebuild_scrub_enabled zfs_rebuild_scrub_enabled
REMOVAL_SUSPEND_PROGRESS removal_suspend_progress zfs_removal_suspend_progress
REMOVE_MAX_SEGMENT remove_max_segment zfs_remove_max_segment
RESILVER_MIN_TIME_MS resilver_min_time_ms zfs_resilver_min_time_ms
RESILVER_DEFER_PERCENT resilver_defer_percent zfs_resilver_defer_percent
SCAN_LEGACY scan_legacy zfs_scan_legacy
SCAN_SUSPEND_PROGRESS scan_suspend_progress zfs_scan_suspend_progress
SCAN_VDEV_LIMIT scan_vdev_limit zfs_scan_vdev_limit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ set -A RESTARTS -- '1' '2' '2' '2'
set -A VDEVS -- '' '' '' ''
set -A DEFER_RESTARTS -- '1' '1' '1' '2'
set -A DEFER_VDEVS -- '-' '2' '2' '-'
set -A EARLY_RESTART_DEFER_RESTARTS -- '1' '2' '2' '2'
set -A EARLY_RESTART_DEFER_VDEVS -- '' '' '' ''

VDEV_REPLACE="${VDEV_FILES[1]} $SPARE_VDEV_FILE"

Expand Down Expand Up @@ -125,7 +127,7 @@ done
wait

# test without and with deferred resilve feature enabled
for test in "without" "with"
for test in "without" "with" "with_early_restart"
do
log_note "Testing $test deferred resilvers"

Expand All @@ -135,6 +137,13 @@ do
RESTARTS=( "${DEFER_RESTARTS[@]}" )
VDEVS=( "${DEFER_VDEVS[@]}" )
VDEV_REPLACE="$SPARE_VDEV_FILE ${VDEV_FILES[1]}"
log_must set_tunable32 RESILVER_DEFER_PERCENT 0
elif [[ $test == "with_early_restart" ]]
then
RESTARTS=( "${EARLY_RESTART_DEFER_RESTARTS[@]}" )
VDEVS=( "${EARLY_RESTART_DEFER_VDEVS[@]}" )
VDEV_REPLACE="${VDEV_FILES[1]} $SPARE_VDEV_FILE"
log_must set_tunable32 RESILVER_DEFER_PERCENT 100
fi

# clear the events
Expand Down

0 comments on commit b60ccd2

Please sign in to comment.