@@ -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))
@@ -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))
@@ -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))
@@ -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))
@@ -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')
@@ -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))
@@ -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))
@@ -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))
@@ -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))
@@ -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))
@@ -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))
@@ -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))
@@ -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))
@@ -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))
@@ -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
@@ -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) ))
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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."
runtest() {
@@ -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."
runtest() {
@@ -65,7 +65,7 @@ bufnr=1280
bufsize=$((blksz * bufnr))
free_blocks=$(stat -f -c '%a' $testdir)
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
space_needed=$(((filesize * 3) * 5 / 4))
space_avail=$((free_blocks * real_blksz))
test $space_needed -gt $space_avail && _notrun "Not enough space. $space_avail < $space_needed"
@@ -66,7 +66,7 @@ bufnr=1280
bufsize=$((blksz * bufnr))
free_blocks=$(stat -f -c '%a' $testdir)
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
space_needed=$(((filesize * 3) * 5 / 4))
space_avail=$((free_blocks * real_blksz))
test $space_needed -gt $space_avail && _notrun "Not enough space. $space_avail < $space_needed"
@@ -61,7 +61,7 @@ filesize=$((blksz * nr))
bufnr=16
bufsize=$((blksz * bufnr))
-real_blksz=$(stat -f -c '%S' "$testdir")
+real_blksz=$(get_block_size "$testdir")
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
echo "Create the original files"
@@ -59,7 +59,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=26 # 2^26 reflink extents should be enough to find a slow op?
@@ -59,7 +59,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=26 # 2^26 reflink extents should be enough to find a slow op?
@@ -65,7 +65,7 @@ bufnr=16
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -66,7 +66,7 @@ bufnr=16
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -55,7 +55,7 @@ testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
echo "Create the original file and reflink to copy1, copy2"
-blksz="$(stat -f $testdir -c '%S')"
+blksz="$(get_block_size $testdir)"
_pwrite_byte 0x61 0 $((blksz * 14 + 71)) $testdir/original >> $seqres.full
_cp_reflink $testdir/original $testdir/copy1
_cp_reflink $testdir/copy1 $testdir/copy2
@@ -60,7 +60,7 @@ echo "Create the original file and reflink to file2, file3"
blks=2000
margin=160
blksz=65536
-real_blksz="$(stat -f $testdir -c '%S')"
+real_blksz="$(get_block_size $testdir)"
blksz_factor=$((blksz / real_blksz))
_pwrite_byte 0x61 0 $((blks * blksz)) $testdir/file1 >> $seqres.full
_cp_reflink $testdir/file1 $testdir/file2
@@ -59,7 +59,7 @@ mkdir $testdir
metadump_file=$TEST_DIR/${seq}_metadump
echo "Create the original file blocks"
-blksz="$(stat -f $testdir -c '%S')"
+blksz="$(get_block_size $testdir)"
nr_blks=$((4 * blksz / 12))
_pwrite_byte 0x61 0 $((blksz * nr_blks)) $testdir/file1 >> $seqres.full
@@ -72,7 +72,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=100
sz=$((blksz * blks))
@@ -54,7 +54,7 @@ _scratch_mount >> $seqres.full 2>&1
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
-blksz="$(stat -f $testdir -c '%S')"
+blksz="$(get_block_size $testdir)"
echo "Create the original files"
sz=$((48 * 1048576))
@@ -54,7 +54,7 @@ _scratch_mount >> $seqres.full 2>&1
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
-blksz=$(stat -f -c '%S' $testdir)
+blksz=$(get_block_size $testdir)
echo "Create the original files"
sz=$((48 * 1048576))
@@ -57,7 +57,7 @@ testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
echo "Create the original file blocks"
-blksz="$(stat -f $testdir -c '%S')"
+blksz="$(get_block_size $testdir)"
nr_blks=$((8 * blksz / 12))
for i in 1 2 x; do
@@ -68,7 +68,7 @@ bufnr=16
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -69,7 +69,7 @@ bufnr=16
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -68,7 +68,7 @@ bufnr=16
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -69,7 +69,7 @@ bufnr=16
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -67,7 +67,7 @@ bufnr=16
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -68,7 +68,7 @@ bufnr=16
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -70,7 +70,7 @@ bufnr=16
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -71,7 +71,7 @@ bufnr=16
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -71,7 +71,7 @@ bufnr=16
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -69,7 +69,7 @@ bufnr=16
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 2 * 5 / 4))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -66,7 +66,7 @@ echo "Create the original files"
blksz=65536
nr=64
filesize=$((blksz * nr))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
$XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
_weave_reflink_unwritten $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
@@ -65,7 +65,7 @@ echo "Create the original files"
blksz=65536
nr=64
filesize=$((blksz * nr))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
$XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
_weave_reflink_unwritten $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
@@ -66,7 +66,7 @@ echo "Create the original files"
blksz=65536
nr=64
filesize=$((blksz * nr))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
$XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
_weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
@@ -65,7 +65,7 @@ echo "Create the original files"
blksz=65536
nr=64
filesize=$((blksz * nr))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
$XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
_weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
@@ -67,7 +67,7 @@ echo "Create the original files"
blksz=65536
nr=64
filesize=$((blksz * nr))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
$XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
_weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
@@ -66,7 +66,7 @@ echo "Create the original files"
blksz=65536
nr=64
filesize=$((blksz * nr))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
$XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
_weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
@@ -66,7 +66,7 @@ echo "Create the original files"
blksz=65536
nr=64
filesize=$((blksz * nr))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
$XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
_weave_reflink_regular $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
@@ -65,7 +65,7 @@ echo "Create the original files"
blksz=65536
nr=64
filesize=$((blksz * nr))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
$XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
_weave_reflink_regular $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
@@ -72,7 +72,7 @@ echo "Create the original files"
blksz=65536
nr=64
filesize=$((blksz * nr))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
$XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
_weave_reflink_rainbow $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
@@ -72,7 +72,7 @@ echo "Create the original files"
blksz=65536
nr=64
filesize=$((blksz * nr))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
$XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
_weave_reflink_rainbow $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
@@ -72,7 +72,7 @@ bufnr=2
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -73,7 +73,7 @@ bufnr=2
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(stat -f -c '%S' $testdir)
+real_blksz=$(get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -53,7 +53,7 @@ testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
echo "Create the original files"
-blksz="$(stat -f $testdir -c '%S')"
+blksz="$(get_block_size $testdir)"
_pwrite_byte 0x61 0 $((blksz * 14 + 71)) $testdir/original >> $seqres.full
cp -p $testdir/original $testdir/copy1
cp -p $testdir/copy1 $testdir/copy2
@@ -59,7 +59,7 @@ mkdir $testdir
metadump_file=$TEST_DIR/${seq}_metadump
echo "Create the original file blocks"
-blksz="$(stat -f $testdir -c '%S')"
+blksz="$(get_block_size $testdir)"
nr_blks=$((4 * blksz / 12))
_pwrite_byte 0x61 0 $((blksz * nr_blks)) $testdir/file1 >> $seqres.full
sync
@@ -57,7 +57,7 @@ testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
echo "Create the original file blocks"
-blksz="$(stat -f $testdir -c '%S')"
+blksz="$(get_block_size $testdir)"
nr_blks=$((8 * blksz / 12))
for i in 1 2 x; do
@@ -59,7 +59,7 @@ testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
echo "Create the original file blocks"
-blksz="$(stat -f $testdir -c '%S')"
+blksz="$(get_block_size $testdir)"
nr_blks=$((2 * blksz / 12))
for i in 1 2 x; do
@@ -59,7 +59,7 @@ testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
echo "Create the original file blocks"
-blksz="$(stat -f $testdir -c '%S')"
+blksz="$(get_block_size $testdir)"
nr_blks=$((2 * blksz / 12))
for i in 1 2 x; do
@@ -58,7 +58,7 @@ _scratch_mkfs >/dev/null 2>&1
_scratch_mount >> $seqres.full
testdir=$SCRATCH_MNT/test-$seq
-blksz="$(stat -f $SCRATCH_MNT -c '%S')"
+blksz="$(get_block_size $SCRATCH_MNT)"
umount $SCRATCH_MNT
@@ -72,7 +72,7 @@ xfs_info $SCRATCH_MNT >> $seqres.full
echo "Create the original file blocks"
mkdir $testdir
-blksz="$(stat -f $testdir -c '%S')"
+blksz="$(get_block_size $testdir)"
$XFS_IO_PROG -f -c "falloc 0 $((nr_blks * blksz))" $testdir/file1 >> $seqres.full
echo "Check extent count"
@@ -62,7 +62,7 @@ mkdir "$testdir"
# 2^10 blocks... that should be plenty for anyone.
fnr=$((12 + LOAD_FACTOR))
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()
{
Don't open code grabbing the block size; just use the helper. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> --- tests/generic/150 | 2 +- tests/generic/151 | 2 +- tests/generic/152 | 2 +- tests/generic/153 | 2 +- tests/generic/154 | 2 +- tests/generic/155 | 2 +- tests/generic/156 | 2 +- tests/generic/157 | 2 +- tests/generic/158 | 2 +- tests/generic/159 | 2 +- tests/generic/160 | 2 +- tests/generic/171 | 2 +- tests/generic/173 | 2 +- tests/generic/174 | 2 +- tests/generic/175 | 2 +- tests/generic/176 | 2 +- tests/generic/205 | 2 +- tests/generic/206 | 2 +- tests/generic/216 | 2 +- tests/generic/217 | 2 +- tests/generic/218 | 2 +- tests/generic/220 | 2 +- tests/generic/222 | 2 +- tests/generic/227 | 2 +- tests/generic/229 | 2 +- tests/generic/238 | 2 +- tests/generic/242 | 2 +- tests/generic/243 | 2 +- tests/generic/296 | 2 +- tests/generic/297 | 2 +- tests/generic/298 | 2 +- tests/generic/301 | 2 +- tests/generic/302 | 2 +- tests/xfs/127 | 2 +- tests/xfs/128 | 2 +- tests/xfs/129 | 2 +- tests/xfs/132 | 2 +- tests/xfs/139 | 2 +- tests/xfs/140 | 2 +- tests/xfs/169 | 2 +- tests/xfs/180 | 2 +- tests/xfs/182 | 2 +- tests/xfs/184 | 2 +- tests/xfs/192 | 2 +- tests/xfs/193 | 2 +- tests/xfs/198 | 2 +- tests/xfs/200 | 2 +- tests/xfs/204 | 2 +- tests/xfs/208 | 2 +- tests/xfs/211 | 2 +- tests/xfs/215 | 2 +- tests/xfs/218 | 2 +- tests/xfs/219 | 2 +- tests/xfs/221 | 2 +- tests/xfs/223 | 2 +- tests/xfs/224 | 2 +- tests/xfs/225 | 2 +- tests/xfs/226 | 2 +- tests/xfs/228 | 2 +- tests/xfs/230 | 2 +- tests/xfs/231 | 2 +- tests/xfs/232 | 2 +- tests/xfs/233 | 2 +- tests/xfs/234 | 2 +- tests/xfs/236 | 2 +- tests/xfs/265 | 2 +- tests/xfs/309 | 2 +- tests/xfs/310 | 4 ++-- tests/xfs/328 | 2 +- 69 files changed, 70 insertions(+), 70 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html