@@ -257,7 +257,7 @@ _sort_getfattr_output()
if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" ]; then
MAX_ATTRS=1000
else # Assume max ~1 block of attrs
- BLOCK_SIZE=`get_block_size $TEST_DIR`
+ BLOCK_SIZE=`_get_block_size $TEST_DIR`
# user.attribute_XXX="value.XXX" is about 32 bytes; leave some overhead
let MAX_ATTRS=$BLOCK_SIZE/40
fi
@@ -268,7 +268,7 @@ export MAX_ATTRS
if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" -o "$FSTYP" == "btrfs" ]; then
MAX_ATTRVAL_SIZE=64
else # Assume max ~1 block of attrs
- BLOCK_SIZE=`get_block_size $TEST_DIR`
+ BLOCK_SIZE=`_get_block_size $TEST_DIR`
# leave a little overhead
let MAX_ATTRVAL_SIZE=$BLOCK_SIZE-256
fi
@@ -29,7 +29,7 @@ _require_defrag()
ext4|ext4dev)
testfile="$TEST_DIR/$$-test.defrag"
donorfile="$TEST_DIR/$$-donor.defrag"
- bsize=`get_block_size $TEST_DIR`
+ bsize=`_get_block_size $TEST_DIR`
$XFS_IO_PROG -f -c "pwrite -b $bsize 0 $bsize" $testfile > /dev/null
cp $testfile $donorfile
echo $testfile | $here/src/e4compact -v -f $donorfile | \
@@ -265,7 +265,7 @@ _filter_xfs_io_units_modified()
_filter_xfs_io_blocks_modified()
{
- BLOCK_SIZE=$(get_block_size $SCRATCH_MNT)
+ BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT)
_filter_xfs_io_units_modified "Block" $BLOCK_SIZE
}
@@ -383,7 +383,7 @@ _filter_ro_mount() {
_filter_od()
{
- BLOCK_SIZE=$(get_block_size $SCRATCH_MNT)
+ BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT)
$AWK_PROG -v block_size=$BLOCK_SIZE '
/^[0-9]+/ {
offset = strtonum("0"$1);
@@ -584,7 +584,7 @@ _test_generic_punch()
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
- block_size=`get_block_size $TEST_DIR`
+ block_size=`_get_block_size $TEST_DIR`
$XFS_IO_PROG -f -c "truncate $block_size" \
-c "pwrite 0 $block_size" $sync_cmd \
-c "$zero_cmd 128 128" \
@@ -3077,10 +3077,10 @@ _sysfs_dev()
echo /sys/dev/block/$_maj:$_min
}
-get_block_size()
+_get_block_size()
{
if [ -z $1 ] || [ ! -d $1 ]; then
- echo "Missing mount point argument for get_block_size"
+ echo "Missing mount point argument for _get_block_size"
exit 1
fi
echo `stat -f -c %S $1`
@@ -62,7 +62,7 @@ rm -f $seqres.full
_scratch_mkfs "--nodesize 65536" >>$seqres.full 2>&1
_scratch_mount
-BLOCK_SIZE=$(get_block_size $SCRATCH_MNT)
+BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT)
EXTENT_SIZE=$((2 * $BLOCK_SIZE))
$XFS_IO_PROG -f -d -c "pwrite 0 $EXTENT_SIZE" $SCRATCH_MNT/foo \
@@ -58,7 +58,7 @@ test_btrfs_clone_same_file()
_scratch_mkfs >/dev/null 2>&1
_scratch_mount $MOUNT_OPTIONS
- BLOCK_SIZE=$(get_block_size $SCRATCH_MNT)
+ BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT)
EXTENT_SIZE=$((2 * $BLOCK_SIZE))
@@ -59,7 +59,7 @@ test_btrfs_clone_with_holes()
_scratch_mkfs "$1" >/dev/null 2>&1
_scratch_mount
- BLOCK_SIZE=$(get_block_size $SCRATCH_MNT)
+ BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT)
EXTENT_SIZE=$((2 * $BLOCK_SIZE))
@@ -67,7 +67,7 @@ test_btrfs_clone_fsync_log_recover()
MOUNT_OPTIONS="$MOUNT_OPTIONS $2"
_mount_flakey
- BLOCK_SIZE=$(get_block_size $SCRATCH_MNT)
+ BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT)
EXTENT_SIZE=$((2 * $BLOCK_SIZE))
@@ -66,7 +66,7 @@ mkdir $send_files_dir
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount "-o compress"
-BLOCK_SIZE=$(get_block_size $SCRATCH_MNT)
+BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT)
# Create the file with a single extent of 32 blocks. This creates a metadata
# file extent item with a data start offset of 0 and a logical length of
@@ -62,7 +62,7 @@ _scratch_mkfs >>$seqres.full 2>&1
_init_flakey
_mount_flakey
-BLOCK_SIZE=$(get_block_size $SCRATCH_MNT)
+BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT)
# Create prealloc extent covering file block range [40, 155[
$XFS_IO_PROG -f -c "falloc $((40 * $BLOCK_SIZE)) $((115 * $BLOCK_SIZE))" \
@@ -50,7 +50,7 @@ rm -f $seqres.full
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-BLOCK_SIZE=$(get_block_size $SCRATCH_MNT)
+BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT)
# Create our test files. File foo has the same 2k of data at offset $BLOCK_SIZE
# as file bar has at its offset 0.
@@ -56,7 +56,7 @@ mkdir $send_files_dir
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-BLOCK_SIZE=$(get_block_size $SCRATCH_MNT)
+BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT)
# Create our test file with a single extent of 16 blocks starting at a file
# offset mapped by 32nd block.
@@ -57,7 +57,7 @@ _scratch_mkfs >>$seqres.full 2>&1
_init_flakey
_mount_flakey
-BLOCK_SIZE=$(get_block_size $SCRATCH_MNT)
+BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT)
# Create our test file with a single 25 block extent starting at file offset
# mapped by 200th block We fsync the file here to make the fsync log tree get a
@@ -55,7 +55,7 @@ test_clone_and_read_compressed_extent()
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount $mount_opts
- BLOCK_SIZE=$(get_block_size $SCRATCH_MNT)
+ BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT)
# Create a test file with a single extent that is compressed (the
# data we write into it is highly compressible no matter which
@@ -53,7 +53,7 @@ _scratch_mount
testfile=$SCRATCH_MNT/$seq.$$
BLOCKS=10240
-BSIZE=`get_block_size $SCRATCH_MNT`
+BSIZE=`_get_block_size $SCRATCH_MNT`
length=$(($BLOCKS * $BSIZE))
@@ -49,7 +49,7 @@ _require_xfs_io_command "fcollapse"
src=$SCRATCH_MNT/testfile
dest=$SCRATCH_MNT/testfile.dest
BLOCKS=100
-BSIZE=`get_block_size $SCRATCH_MNT`
+BSIZE=`_get_block_size $SCRATCH_MNT`
rm -f $seqres.full
_scratch_mkfs >> $seqres.full 2>&1 || _fail "mkfs failed"
@@ -55,7 +55,7 @@ rm -rf $testdir
mkdir $testdir
echo "Create the original file blocks"
-blksz="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+blksz="$(_get_block_size $testdir)"
blks=2000
margin='15%'
sz=$((blksz * blks))
@@ -67,7 +67,7 @@ rm -rf $testdir
mkdir $testdir
echo "Create the original file blocks"
-blksz="$(get_block_size $testdir)"
+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="$(get_block_size $testdir1)"
+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="$(get_block_size $testdir1)"
+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="$(get_block_size $testdir1)"
+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="$(get_block_size $testdir1)"
+blksz="$(_get_block_size $testdir1)"
blks=1000
margin='7%'
sz=$((blksz * blks))
@@ -58,7 +58,7 @@ testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
echo "Reformat with appropriate size"
-blksz="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+blksz="$(_get_block_size $testdir)"
umount $SCRATCH_MNT
file_size=$((168 * 1024 * 1024))
@@ -58,7 +58,7 @@ testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
echo "Reformat with appropriate size"
-blksz="$(get_block_size $testdir)"
+blksz="$(_get_block_size $testdir)"
nr_blks=10240
umount $SCRATCH_MNT
sz_bytes=$((nr_blks * 8 * blksz))
@@ -59,7 +59,7 @@ testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
echo "Reformat with appropriate size"
-blksz="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+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=$(get_block_size "$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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $testdir)
+real_blksz=$(_get_block_size $testdir)
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
runtest() {
@@ -62,7 +62,7 @@ rm -f $seqres.full
rm -f $TEST_DIR/aiodio_sparse
logical_block_size=`_min_dio_alignment $TEST_DEV`
-fs_block_size=`get_block_size $TEST_DIR`
+fs_block_size=`_get_block_size $TEST_DIR`
file_size=$((8 * $fs_block_size))
if [ $fs_block_size -le $logical_block_size ]; then
@@ -65,7 +65,7 @@ bufnr=1280
bufsize=$((blksz * bufnr))
free_blocks=$(stat -f -c '%a' $testdir)
-real_blksz=$(get_block_size $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=$(get_block_size $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"
@@ -117,7 +117,7 @@ _scratch_mount
# Test must be able to write files with non-root permissions
chmod 777 $SCRATCH_MNT
-block_size=`get_block_size $SCRATCH_MNT`
+block_size=`_get_block_size $SCRATCH_MNT`
_test_full_fs_punch $(( $block_size * 2 )) $block_size 500 $SCRATCH_MNT/252.$$ $block_size
status=0 ; exit
@@ -106,7 +106,7 @@ _do_workload()
{
_pids=""
_pid=1
- block_size=$(get_block_size $SCRATCH_MNT)
+ block_size=$(_get_block_size $SCRATCH_MNT)
_threads_set
_file_create $block_size
@@ -61,7 +61,7 @@ filesize=$((blksz * nr))
bufnr=16
bufsize=$((blksz * bufnr))
-real_blksz=$(get_block_size "$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="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+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=$(get_block_size $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=$(get_block_size $testdir)
+real_blksz=$(_get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -49,7 +49,7 @@ _require_test
rm -f $seqres.full
echo "Silence is golden"
-block_size=`get_block_size $TEST_DIR`
+block_size=`_get_block_size $TEST_DIR`
# On unpatched ext4, if an extent exists which includes the block right
# before the maximum file offset, and the block for the maximum file offset
@@ -54,7 +54,7 @@ _require_test
_require_xfs_io_command "falloc"
_require_test_program "dio-interleaved"
-extent_size="$(($(get_block_size "$TEST_DIR") * 2))"
+extent_size="$(($(_get_block_size "$TEST_DIR") * 2))"
num_extents=1024
testfile="$TEST_DIR/$$-testfile"
@@ -165,7 +165,7 @@ echo "done."
echo -n "Comparing holes to the reported space from FS..."
# Get block size
-block_size=$(get_block_size $loop_mnt/)
+block_size=$(_get_block_size $loop_mnt/)
sectors_per_block=`expr $block_size / 512`
# Obtain free space from filesystem
@@ -55,7 +55,7 @@ testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
echo "Create the original file and reflink to copy1, copy2"
-blksz="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+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=$(get_block_size $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="$(get_block_size $testdir)"
+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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $testdir)
+real_blksz=$(_get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -72,7 +72,7 @@ bufnr=16
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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=$(get_block_size $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="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+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="$(get_block_size $testdir)"
+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="$(get_block_size $SCRATCH_MNT)"
+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="$(get_block_size $testdir)"
+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=$(get_block_size $testdir)
+blksz=$(_get_block_size $testdir)
space_avail=$((free_blocks * blksz))
calc_space()
{
@@ -55,7 +55,7 @@ _scratch_mkfs > "$seqres.full" 2>&1
echo "+ mount fs image"
_scratch_mount
-blksz="$(get_block_size $SCRATCH_MNT)"
+blksz="$(_get_block_size $SCRATCH_MNT)"
# btree header is 56 bytes; an rmapbt record is 24 bytes; and
# a rmapbt key/pointer pair is 44 bytes.
@@ -54,7 +54,7 @@ _scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
. $tmp.mkfs
cat $tmp.mkfs > "$seqres.full" 2>&1
_scratch_mount
-blksz="$(get_block_size $SCRATCH_MNT)"
+blksz="$(_get_block_size $SCRATCH_MNT)"
echo "Create a three-level rtrmapbt"
# inode core size is at least 176 bytes; btree header is 56 bytes;
@@ -54,7 +54,7 @@ _scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
. $tmp.mkfs
cat $tmp.mkfs > "$seqres.full" 2>&1
_scratch_mount
-blksz="$(get_block_size $SCRATCH_MNT)"
+blksz="$(_get_block_size $SCRATCH_MNT)"
metadump_file=$TEST_DIR/${seq}_metadump
rm -rf $metadump_file
@@ -57,7 +57,7 @@ cat $tmp.mkfs > "$seqres.full" 2>&1
echo "+ mount fs image"
_scratch_mount
-blksz="$(get_block_size $SCRATCH_MNT)"
+blksz="$(_get_block_size $SCRATCH_MNT)"
# inode core size is at least 176 bytes; btree header is 56 bytes;
# rtrmap record is 32 bytes; and rtrmap key/pointer are 56 bytes.
@@ -54,7 +54,7 @@ _scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
. $tmp.mkfs
cat $tmp.mkfs > "$seqres.full" 2>&1
_scratch_mount
-blksz="$(get_block_size $SCRATCH_MNT)"
+blksz="$(_get_block_size $SCRATCH_MNT)"
# inode core size is at least 176 bytes; btree header is 56 bytes;
# rtrmap record is 32 bytes; and rtrmap key/pointer are 56 bytes.
@@ -53,7 +53,7 @@ _scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
. $tmp.mkfs
cat $tmp.mkfs > "$seqres.full" 2>&1
_scratch_mount
-blksz="$(get_block_size $SCRATCH_MNT)"
+blksz="$(_get_block_size $SCRATCH_MNT)"
# inode core size is at least 176 bytes; btree header is 56 bytes;
# rtrmap record is 32 bytes; and rtrmap key/pointer are 56 bytes.
@@ -70,7 +70,7 @@ bufnr=16
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(get_block_size $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=$(get_block_size $testdir)
+real_blksz=$(_get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -70,7 +70,7 @@ bufnr=8
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(get_block_size $testdir)
+real_blksz=$(_get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
@@ -69,7 +69,7 @@ bufnr=8
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(get_block_size $testdir)
+real_blksz=$(_get_block_size $testdir)
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
Add a leading underscore to the get_block_size helper since it's a common function. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> --- common/attr | 4 ++-- common/defrag | 2 +- common/filter | 4 ++-- common/punch | 2 +- common/rc | 4 ++-- tests/btrfs/017 | 2 +- tests/btrfs/052 | 2 +- tests/btrfs/055 | 2 +- tests/btrfs/056 | 2 +- tests/btrfs/094 | 2 +- tests/btrfs/095 | 2 +- tests/btrfs/096 | 2 +- tests/btrfs/097 | 2 +- tests/btrfs/098 | 2 +- tests/btrfs/103 | 2 +- tests/generic/017 | 2 +- tests/generic/064 | 2 +- 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/172 | 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/240 | 2 +- tests/generic/242 | 2 +- tests/generic/243 | 2 +- tests/generic/256 | 2 +- tests/generic/273 | 2 +- tests/generic/296 | 2 +- tests/generic/297 | 2 +- tests/generic/298 | 2 +- tests/generic/301 | 2 +- tests/generic/302 | 2 +- tests/generic/308 | 2 +- tests/generic/391 | 2 +- tests/shared/298 | 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 +- tests/xfs/331 | 2 +- tests/xfs/335 | 2 +- tests/xfs/336 | 2 +- tests/xfs/337 | 2 +- tests/xfs/341 | 2 +- tests/xfs/342 | 2 +- tests/xfs/344 | 2 +- tests/xfs/345 | 2 +- tests/xfs/346 | 2 +- tests/xfs/347 | 2 +- 103 files changed, 107 insertions(+), 107 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html