3 # test the reshape code by using test_reshape and the
4 # kernel md code to move data into and out of variously
10 for chunk in 4 8 16 32 64 128
13 for disks in 2 3 4 5 6
15 eval devs=\"$devs \$dev$disks\"
16 if [ " $level $disks" = " 6 3" -o " $level $disks" = " 6 2" ]
19 for nlayout in 0 1 2 3
21 layout=${layouts[$nlayout]}
23 size=$[chunk*(disks-(level-4))*disks]
25 # test restore: make a raid5 from a file, then do a compare
26 dd if=/dev/urandom of=/tmp/RandFile bs=1024 count=$size
27 $dir/test_stripe restore /tmp/RandFile $disks $[chunk*1024] $level $nlayout 0 $[size*1024] $devs
28 mdadm -CR -e 1.0 $md0 -amd -l$level -n$disks --assume-clean -c $chunk -p $layout $devs
29 cmp -s -n $[size*1024] $md0 /tmp/RandFile || { echo cmp failed ; exit 2; }
34 dd if=/dev/urandom of=$md0 bs=1024 count=$size
35 blockdev --flushbufs $md0 $devs; sync
37 $dir/test_stripe save /tmp/NewRand $disks $[chunk*1024] $level $nlayout 0 $[size*1024] $devs
38 cmp -s -n $[size*1024] $md0 /tmp/NewRand || { echo cmp failed ; exit 2; }