fstests: use get_block_size helper

Don't open code grabbing the block size; just use the helper.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Darrick J. Wong
2016-09-29 19:23:34 -07:00
committed by Eryu Guan
parent 3ea91b080b
commit fff869cb9c
69 changed files with 70 additions and 70 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ rm -rf $testdir
mkdir $testdir
echo "Create the original file blocks"
blksz="$(stat -f $testdir -c '%S')"
blksz="$(get_block_size $testdir)"
blks=2000
margin='15%'
sz=$((blksz * blks))
+1 -1
View File
@@ -59,7 +59,7 @@ rm -rf $testdir
mkdir $testdir
echo "Create the original file blocks"
blksz="$(stat -f $testdir -c '%S')"
blksz="$(get_block_size $testdir)"
blks=2000
margin='15%'
sz=$((blksz * blks))
+1 -1
View File
@@ -60,7 +60,7 @@ rm -rf $testdir
mkdir $testdir
echo "Create the original file blocks"
blksz="$(stat -f $testdir -c '%S')"
blksz="$(get_block_size $testdir)"
blks=2000
margin='15%'
sz=$((blksz * blks))
+1 -1
View File
@@ -60,7 +60,7 @@ rm -rf $testdir
mkdir $testdir
echo "Create the original file blocks"
blksz="$(stat -f $testdir -c '%S')"
blksz="$(get_block_size $testdir)"
blks=2000
margin='15%'
sz=$((blksz * blks))
+1 -1
View File
@@ -59,7 +59,7 @@ rm -rf $testdir
mkdir $testdir
echo "Create the original file blocks"
blksz="$(stat -f $testdir -c '%S')"
blksz="$(get_block_size $testdir)"
blks=2000
margin='15%'
free_blocks0=$(stat -f $testdir -c '%f')
+1 -1
View File
@@ -64,7 +64,7 @@ rm -rf $testdir
mkdir $testdir
echo "Create the original file blocks"
blksz="$(stat -f $testdir -c '%S')"
blksz="$(get_block_size $testdir)"
blks=2000
margin='15%'
sz=$((blksz * blks))
+1 -1
View File
@@ -71,7 +71,7 @@ rm -rf $testdir
mkdir $testdir
echo "Create the original file blocks"
blksz="$(stat -f $testdir -c '%S')"
blksz="$(get_block_size $testdir)"
blks=2000
margin='15%'
sz=$((blksz * blks))
+1 -1
View File
@@ -60,7 +60,7 @@ testdir2=$SCRATCH_MNT/test-$seq
mkdir $testdir2
echo "Create the original files"
blksz="$(stat -f $testdir1 -c '%S')"
blksz="$(get_block_size $testdir1)"
blks=1000
margin='7%'
sz=$((blksz * blks))
+1 -1
View File
@@ -60,7 +60,7 @@ testdir2=$SCRATCH_MNT/test-$seq
mkdir $testdir2
echo "Create the original files"
blksz="$(stat -f $testdir1 -c '%S')"
blksz="$(get_block_size $testdir1)"
blks=1000
margin='7%'
sz=$((blksz * blks))
+1 -1
View File
@@ -54,7 +54,7 @@ rm -rf $testdir1
mkdir $testdir1
echo "Create the original files"
blksz="$(stat -f $testdir1 -c '%S')"
blksz="$(get_block_size $testdir1)"
blks=1000
margin='7%'
sz=$((blksz * blks))
+1 -1
View File
@@ -54,7 +54,7 @@ rm -rf $testdir1
mkdir $testdir1
echo "Create the original files"
blksz="$(stat -f $testdir1 -c '%S')"
blksz="$(get_block_size $testdir1)"
blks=1000
margin='7%'
sz=$((blksz * blks))
+1 -1
View File
@@ -57,7 +57,7 @@ testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
echo "Reformat with appropriate size"
blksz="$(stat -f $testdir -c '%S')"
blksz="$(get_block_size $testdir)"
nr_blks=10240
umount $SCRATCH_MNT
sz_bytes=$((nr_blks * 8 * blksz))
+1 -1
View File
@@ -57,7 +57,7 @@ testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
echo "Reformat with appropriate size"
blksz="$(stat -f $testdir -c '%S')"
blksz="$(get_block_size $testdir)"
nr_blks=10240
umount $SCRATCH_MNT
sz_bytes=$((nr_blks * 8 * blksz))
+1 -1
View File
@@ -58,7 +58,7 @@ testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
echo "Reformat with appropriate size"
blksz="$(stat -f $testdir -c '%S')"
blksz="$(get_block_size $testdir)"
nr_blks=10240
umount $SCRATCH_MNT
sz_bytes=$((nr_blks * 8 * blksz))
+1 -1
View File
@@ -56,7 +56,7 @@ testdir="$SCRATCH_MNT/test-$seq"
mkdir "$testdir"
echo "Create a one block file"
blksz="$(stat -f "$testdir" -c '%S')"
blksz="$(get_block_size $testdir)"
_pwrite_byte 0x61 0 $blksz "$testdir/file1" >> "$seqres.full"
fnr=19
+1 -1
View File
@@ -60,7 +60,7 @@ mkdir "$testdir"
# 2^17 blocks... that should be plenty for anyone.
fnr=20
free_blocks=$(stat -f -c '%a' "$testdir")
blksz=$(stat -f -c '%S' "$testdir")
blksz=$(get_block_size "$testdir")
space_avail=$((free_blocks * blksz))
calc_space() {
blocks_needed=$(( 2 ** (fnr + 1) ))
+1 -1
View File
@@ -60,7 +60,7 @@ _scratch_mount >> $seqres.full 2>&1
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
real_blksz=$(stat -f -c '%S' $testdir)
real_blksz=$(get_block_size $testdir)
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
echo "Create the original files"
+1 -1
View File
@@ -61,7 +61,7 @@ _scratch_mount >> $seqres.full 2>&1
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
real_blksz=$(stat -f -c '%S' $testdir)
real_blksz=$(get_block_size $testdir)
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
echo "Create the original files"
+1 -1
View File
@@ -61,7 +61,7 @@ _scratch_mount >> $seqres.full 2>&1
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
real_blksz=$(stat -f -c '%S' $testdir)
real_blksz=$(get_block_size $testdir)
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
echo "Create the original files"
+1 -1
View File
@@ -62,7 +62,7 @@ _scratch_mount >> $seqres.full 2>&1
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
real_blksz=$(stat -f -c '%S' $testdir)
real_blksz=$(get_block_size $testdir)
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
echo "Create the original files"

Some files were not shown because too many files have changed in this diff Show More