Some variables inside the test's functions were used as local but
were not being declared as such. Add the local declaration for them.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
create_source_file()
{
- name=$1
+ local name=$1
# Create a file with $num_extents extents, each with a size of
# $extent_size bytes.
create_target_file()
{
- name=$1
- file_size=$(($num_extents * $extent_size))
+ local name=$1
+ local file_size=$(($num_extents * $extent_size))
$XFS_IO_PROG -f -c "pwrite -S 0xff 0 $file_size" \
-c "fsync" $SCRATCH_MNT/$name | _filter_xfs_io
reader_loop()
{
- name=$1
+ local name=$1
while true; do
cat $SCRATCH_MNT/$name > /dev/null