while [ $i -le 10 ]; do
lctl mark "start test"
- local before=$($LFS df | awk '{if ($1 ~/^filesystem/) \
- {print $5; exit} }')
- dd if=/dev/zero of=$DIR1/$tdir/file000 bs=1M count=$SIZE
- sync # sync data from client's cache
- sync_all_data # sync data from server's cache (delayed
- # allocation)
+ local before=$($LFS df | awk '{ if ($1 ~/^filesystem/) \
+ { print $5; exit} }')
+ dd if=/dev/zero of=$DIR1/$tdir/$tfile bs=1M count=$SIZE ||
+ error "dd $DIR1/$tdir/$tfile ${SIZE}MB failed"
+ sync # sync data from client cache
+ sync_all_data # sync data from server cache (delayed allocation)
sleep 1
- local after_dd=$($LFS df | awk '{if ($1 ~/^filesystem/) \
- {print $5; exit} }')
- multiop_bg_pause $DIR2/$tdir/file000 O_r${SIZE_B}c || return 3
+ local after_dd=$($LFS df | awk '{ if ($1 ~/^filesystem/) \
+ { print $5; exit} }')
+ multiop_bg_pause $DIR2/$tdir/$tfile O_r${SIZE_B}c || return 3
read_pid=$!
- rm -f $DIR1/$tdir/file000
+ rm -f $DIR1/$tdir/$tfile
kill -USR1 $read_pid
wait $read_pid
wait_delete_completed
- local after=$($LFS df | awk '{if ($1 ~/^filesystem/) \
- {print $5; exit} }')
+ local after=$($LFS df | awk '{ if ($1 ~/^filesystem/) \
+ { print $5; exit} }')
echo "*** cycle($i) *** before($before) after_dd($after_dd)" \
"after($after)"
# this free space! not used