File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
tests/zfs-tests/tests/functional/replacement Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ function replace_test
101
101
typeset -i iters=2
102
102
typeset disk1=$1
103
103
typeset disk2=$2
104
+ typeset repl_type=$3
104
105
105
106
typeset i=0
106
107
while [[ $i -lt $iters ]]; do
@@ -114,9 +115,13 @@ function replace_test
114
115
(( i = i + 1 ))
115
116
done
116
117
118
+ typeset repl_flag=" -w"
119
+ if [[ " $repl_type " == " seq" ]]; then
120
+ repl_flag=" -ws"
121
+ fi
117
122
# replace disk with a slow drive still present
118
123
SECONDS=0
119
- log_must zpool replace -w $TESTPOOL1 $disk1 $disk2
124
+ log_must zpool replace $repl_flag $TESTPOOL1 $disk1 $disk2
120
125
log_note took $SECONDS seconds to replace disk
121
126
122
127
for wait_pid in $child_pids
@@ -178,7 +183,11 @@ for type in "raidz2" "raidz3" "draid2"; do
178
183
log_note took $SECONDS seconds to reach sit out reading ${size} M
179
184
log_must zpool status -s $TESTPOOL1
180
185
181
- replace_test $TESTDIR /$TESTFILE1 .1 $TESTDIR /$REPLACEFILE
186
+ typeset repl_type=" replace"
187
+ if [[ " $type " == " draid2" && $(( RANDOM % 2 )) -eq 0 ]]; then
188
+ repl_type=" seq"
189
+ fi
190
+ replace_test $TESTDIR /$TESTFILE1 .1 $TESTDIR /$REPLACEFILE $repl_type
182
191
183
192
log_must eval " zpool iostat -v $TESTPOOL1 | grep \" $REPLACEFILE \" "
184
193
You can’t perform that action at this time.
0 commit comments