Instead of having every test case that uses _btrfs_stress_subvolume()
removing the stop file before calling that function, do the file
remove at _btrfs_stress_subvolume(). There's no point in doing it in
every single test case.
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
local subvol_mnt=$4
local stop_file=$5
+ rm -f $stop_file
mkdir -p $subvol_mnt
while [ ! -e $stop_file ]; do
$BTRFS_UTIL_PROG subvolume create $btrfs_mnt/$subvol_name
balance_pid=$!
echo "$balance_pid" >>$seqres.full
- # make sure the stop sign is not there
- rm -f $stop_file
echo -n "Start subvolume worker: " >>$seqres.full
_btrfs_stress_subvolume $SCRATCH_DEV $SCRATCH_MNT subvol_$$ $subvol_mnt $stop_file >/dev/null 2>&1 &
subvol_pid=$!
$FSSTRESS_PROG $args >>$seqres.full &
fsstress_pid=$!
- # make sure the stop sign is not there
- rm -f $stop_file
echo -n "Start subvolume worker: " >>$seqres.full
_btrfs_stress_subvolume $SCRATCH_DEV $SCRATCH_MNT subvol_$$ $subvol_mnt $stop_file >/dev/null 2>&1 &
subvol_pid=$!
$FSSTRESS_PROG $args >>$seqres.full &
fsstress_pid=$!
- # make sure the stop sign is not there
- rm -f $stop_file
echo -n "Start subvolume worker: " >>$seqres.full
_btrfs_stress_subvolume $SCRATCH_DEV $SCRATCH_MNT subvol_$$ $subvol_mnt $stop_file >/dev/null 2>&1 &
subvol_pid=$!
$FSSTRESS_PROG $args >>$seqres.full &
fsstress_pid=$!
- # make sure the stop sign is not there
- rm -f $stop_file
echo -n "Start subvolume worker: " >>$seqres.full
_btrfs_stress_subvolume $SCRATCH_DEV $SCRATCH_MNT subvol_$$ $subvol_mnt $stop_file >/dev/null 2>&1 &
subvol_pid=$!
$FSSTRESS_PROG $args >>$seqres.full &
fsstress_pid=$!
- # make sure the stop sign is not there
- rm -f $stop_file
echo -n "Start subvolume worker: " >>$seqres.full
_btrfs_stress_subvolume $SCRATCH_DEV $SCRATCH_MNT subvol_$$ $subvol_mnt $stop_file >/dev/null 2>&1 &
subvol_pid=$!