2 trap 'kill $(jobs -p)' EXIT
6 MAX_MB=${RACER_MAX_MB:-8}
8 OSTCOUNT=${OSTCOUNT:-$($LFS df $DIR 2> /dev/null | grep -c OST)}
11 file=$((RANDOM % MAX))
12 # $RANDOM is between 0 and 32767, and we want $blockcount in 64kB units
13 blockcount=$((RANDOM * MAX_MB / 32 / 64))
14 stripecount=$((RANDOM % (OSTCOUNT + 1)))
15 [ $OSTCOUNT -gt 0 ] &&
16 $LFS setstripe -c $stripecount $DIR/$file 2> /dev/null
17 dd if=/dev/zero of=$DIR/$file bs=64k count=$blockcount 2> /dev/null