test: allow resync/reshape etc to go faster.
Whenever we "check wait" - make the resync process go at full speed. Also allow script to adjust it manually. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
ca36d70735
commit
6fd2a36f9b
11
test
11
test
|
@ -157,10 +157,13 @@ check() {
|
|||
;;
|
||||
|
||||
wait )
|
||||
p=`cat /proc/sys/dev/raid/speed_limit_max`
|
||||
echo 2000000 > /proc/sys/dev/raid/speed_limit_max
|
||||
sleep 0.1
|
||||
while grep -E '(resync|recovery|reshape|check|repair) *=' > /dev/null /proc/mdstat
|
||||
do sleep 2;
|
||||
do sleep 0.5;
|
||||
done
|
||||
echo $p > /proc/sys/dev/raid/speed_limit_max
|
||||
;;
|
||||
|
||||
state )
|
||||
|
@ -217,6 +220,10 @@ testdev() {
|
|||
fi
|
||||
}
|
||||
|
||||
fast_sync() {
|
||||
echo 200000 > /proc/sys/dev/raid/speed_limit_max
|
||||
}
|
||||
|
||||
rotest() {
|
||||
dev=$1
|
||||
fsck -fn $dev >&2
|
||||
|
@ -232,6 +239,8 @@ do_test() {
|
|||
$mdadm -Ssq 2> /dev/null
|
||||
mdadm --zero $devlist 2> /dev/null
|
||||
mdadm --zero $devlist 2> /dev/null
|
||||
# this might have been reset: restore the default.
|
||||
echo 2000 > /proc/sys/dev/raid/speed_limit_max
|
||||
# source script in a subshell, so it has access to our
|
||||
# namespace, but cannot change it.
|
||||
echo -ne "$_script... "
|
||||
|
|
Loading…
Reference in New Issue