test: make 'check wait' more reliable.
'recover' etc doesn't appear in /proc/mdstat immediately. The "sync" thread must be started first. But 'sync_action' shows it as soon as MD_RECOVERY_NEEDED is set in the kernel. So look there too. Now maybe I can get rid of some of those silly 'sleep' calls. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
7d1dda2c55
commit
4a859abdc9
2
test
2
test
|
@ -200,7 +200,7 @@ check() {
|
|||
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
|
||||
while grep -E '(resync|recovery|reshape|check|repair) *=' > /dev/null /proc/mdstat /sys/block/md*/md/sync_action
|
||||
do sleep 0.5;
|
||||
done
|
||||
echo $p > /proc/sys/dev/raid/speed_limit_max
|
||||
|
|
Loading…
Reference in New Issue