#!/bin/bash

DEV=           # devide e.g. /dev/sda8
MP=            # mount point
TUSER=         # regular user for test
i=0
mke2fs -t ext4 -O ^extents -b 4096 $DEV > /dev/null 950M 2>&1
mount -t ext4 $DEV $MP
dd if=/dev/zero of=$MP/fill_blk bs=1M count=775 > /dev/null 2>&1
chmod 777 $MP

echo "test start"
while [ $i -le 50 ];
do
	echo "write $i"
	sudo -u $TUSER ./fs_write -S 1 -D -n 16  -s 20971520 $MP/dummy{1..16}
	echo "mwrite $i"
	sudo -u $TUSER ./fs_write -M -n 1 -s 314572800 $MP/dummy1
	((i++))
done
umount $MP
