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>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
104 files changed:
if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" ]; then
MAX_ATTRS=1000
else # Assume max ~1 block of attrs
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
# user.attribute_XXX="value.XXX" is about 32 bytes; leave some overhead
let MAX_ATTRS=$BLOCK_SIZE/40
fi
if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" -o "$FSTYP" == "btrfs" ]; then
MAX_ATTRVAL_SIZE=64
else # Assume max ~1 block of 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
# leave a little overhead
let MAX_ATTRVAL_SIZE=$BLOCK_SIZE-256
fi
ext4|ext4dev)
testfile="$TEST_DIR/$$-test.defrag"
donorfile="$TEST_DIR/$$-donor.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 | \
$XFS_IO_PROG -f -c "pwrite -b $bsize 0 $bsize" $testfile > /dev/null
cp $testfile $donorfile
echo $testfile | $here/src/e4compact -v -f $donorfile | \
_filter_xfs_io_blocks_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
}
_filter_xfs_io_units_modified "Block" $BLOCK_SIZE
}
- 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);
$AWK_PROG -v block_size=$BLOCK_SIZE '
/^[0-9]+/ {
offset = strtonum("0"$1);
if [ "$remove_testfile" ]; then
rm -f $testfile
fi
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" \
$XFS_IO_PROG -f -c "truncate $block_size" \
-c "pwrite 0 $block_size" $sync_cmd \
-c "$zero_cmd 128 128" \
echo /sys/dev/block/$_maj:$_min
}
echo /sys/dev/block/$_maj:$_min
}
{
if [ -z $1 ] || [ ! -d $1 ]; then
{
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`
exit 1
fi
echo `stat -f -c %S $1`
-BLOCK_SIZE=`get_block_size $TEST_DIR`
+BLOCK_SIZE=`_get_block_size $TEST_DIR`
# Create & populate an ext4 filesystem
$MKFS_EXT4_PROG -F -b $BLOCK_SIZE $SCRATCH_DEV > $seqres.full 2>&1 || \
# Create & populate an ext4 filesystem
$MKFS_EXT4_PROG -F -b $BLOCK_SIZE $SCRATCH_DEV > $seqres.full 2>&1 || \
_scratch_mkfs "--nodesize 65536" >>$seqres.full 2>&1
_scratch_mount
_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 \
EXTENT_SIZE=$((2 * $BLOCK_SIZE))
$XFS_IO_PROG -f -d -c "pwrite 0 $EXTENT_SIZE" $SCRATCH_MNT/foo \
_scratch_mkfs >/dev/null 2>&1
_scratch_mount $MOUNT_OPTIONS
_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))
EXTENT_SIZE=$((2 * $BLOCK_SIZE))
_scratch_mkfs "$1" >/dev/null 2>&1
_scratch_mount
_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))
EXTENT_SIZE=$((2 * $BLOCK_SIZE))
MOUNT_OPTIONS="$MOUNT_OPTIONS $2"
_mount_flakey
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))
EXTENT_SIZE=$((2 * $BLOCK_SIZE))
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount "-o compress"
_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
# 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
_init_flakey
_mount_flakey
_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))" \
# Create prealloc extent covering file block range [40, 155[
$XFS_IO_PROG -f -c "falloc $((40 * $BLOCK_SIZE)) $((115 * $BLOCK_SIZE))" \
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
_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.
# Create our test files. File foo has the same 2k of data at offset $BLOCK_SIZE
# as file bar has at its offset 0.
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
_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.
# Create our test file with a single extent of 16 blocks starting at a file
# offset mapped by 32nd block.
_init_flakey
_mount_flakey
_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
# 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
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount $mount_opts
_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
# Create a test file with a single extent that is compressed (the
# data we write into it is highly compressible no matter which
testfile=$SCRATCH_MNT/$seq.$$
BLOCKS=10240
testfile=$SCRATCH_MNT/$seq.$$
BLOCKS=10240
-BSIZE=`get_block_size $SCRATCH_MNT`
+BSIZE=`_get_block_size $SCRATCH_MNT`
length=$(($BLOCKS * $BSIZE))
length=$(($BLOCKS * $BSIZE))
src=$SCRATCH_MNT/testfile
dest=$SCRATCH_MNT/testfile.dest
BLOCKS=100
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"
rm -f $seqres.full
_scratch_mkfs >> $seqres.full 2>&1 || _fail "mkfs failed"
mkdir $testdir
echo "Create the original file blocks"
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))
blks=2000
margin='15%'
sz=$((blksz * blks))
mkdir $testdir
echo "Create the original file blocks"
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))
blks=2000
margin='15%'
sz=$((blksz * blks))
mkdir $testdir
echo "Create the original file blocks"
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))
blks=2000
margin='15%'
sz=$((blksz * blks))
mkdir $testdir
echo "Create the original file blocks"
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))
blks=2000
margin='15%'
sz=$((blksz * blks))
mkdir $testdir
echo "Create the original file blocks"
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')
blks=2000
margin='15%'
free_blocks0=$(stat -f $testdir -c '%f')
mkdir $testdir
echo "Create the original file blocks"
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))
blks=2000
margin='15%'
sz=$((blksz * blks))
mkdir $testdir
echo "Create the original file blocks"
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))
blks=2000
margin='15%'
sz=$((blksz * blks))
mkdir $testdir2
echo "Create the original files"
mkdir $testdir2
echo "Create the original files"
-blksz="$(get_block_size $testdir1)"
+blksz="$(_get_block_size $testdir1)"
blks=1000
margin='7%'
sz=$((blksz * blks))
blks=1000
margin='7%'
sz=$((blksz * blks))
mkdir $testdir2
echo "Create the original files"
mkdir $testdir2
echo "Create the original files"
-blksz="$(get_block_size $testdir1)"
+blksz="$(_get_block_size $testdir1)"
blks=1000
margin='7%'
sz=$((blksz * blks))
blks=1000
margin='7%'
sz=$((blksz * blks))
mkdir $testdir1
echo "Create the original files"
mkdir $testdir1
echo "Create the original files"
-blksz="$(get_block_size $testdir1)"
+blksz="$(_get_block_size $testdir1)"
blks=1000
margin='7%'
sz=$((blksz * blks))
blks=1000
margin='7%'
sz=$((blksz * blks))
mkdir $testdir1
echo "Create the original files"
mkdir $testdir1
echo "Create the original files"
-blksz="$(get_block_size $testdir1)"
+blksz="$(_get_block_size $testdir1)"
blks=1000
margin='7%'
sz=$((blksz * blks))
blks=1000
margin='7%'
sz=$((blksz * blks))
mkdir $testdir
echo "Reformat with appropriate size"
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))
nr_blks=10240
umount $SCRATCH_MNT
sz_bytes=$((nr_blks * 8 * blksz))
mkdir $testdir
echo "Reformat with appropriate size"
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))
umount $SCRATCH_MNT
file_size=$((168 * 1024 * 1024))
mkdir $testdir
echo "Reformat with appropriate size"
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))
nr_blks=10240
umount $SCRATCH_MNT
sz_bytes=$((nr_blks * 8 * blksz))
mkdir $testdir
echo "Reformat with appropriate size"
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))
nr_blks=10240
umount $SCRATCH_MNT
sz_bytes=$((nr_blks * 8 * blksz))
mkdir "$testdir"
echo "Create a one block file"
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
_pwrite_byte 0x61 0 $blksz "$testdir/file1" >> "$seqres.full"
fnr=19
# 2^17 blocks... that should be plenty for anyone.
fnr=20
free_blocks=$(stat -f -c '%a' "$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) ))
space_avail=$((free_blocks * blksz))
calc_space() {
blocks_needed=$(( 2 ** (fnr + 1) ))
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
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"
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
echo "Create the original files"
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
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"
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
echo "Create the original files"
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
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"
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
echo "Create the original files"
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
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"
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
echo "Create the original files"
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
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"
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
echo "Create the original files"
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
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"
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
echo "Create the original files"
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
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"
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
echo "Create the original files"
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
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"
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
echo "Create the original files"
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
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() {
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
runtest() {
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
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() {
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
runtest() {
rm -f $TEST_DIR/aiodio_sparse
logical_block_size=`_min_dio_alignment $TEST_DEV`
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
file_size=$((8 * $fs_block_size))
if [ $fs_block_size -le $logical_block_size ]; then
bufsize=$((blksz * bufnr))
free_blocks=$(stat -f -c '%a' $testdir)
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"
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"
bufsize=$((blksz * bufnr))
free_blocks=$(stat -f -c '%a' $testdir)
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"
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"
# Test must be able to write files with non-root permissions
chmod 777 $SCRATCH_MNT
# 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
_test_full_fs_punch $(( $block_size * 2 )) $block_size 500 $SCRATCH_MNT/252.$$ $block_size
status=0 ; exit
- block_size=$(get_block_size $SCRATCH_MNT)
+ block_size=$(_get_block_size $SCRATCH_MNT)
_threads_set
_file_create $block_size
_threads_set
_file_create $block_size
bufnr=16
bufsize=$((blksz * bufnr))
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"
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
echo "Create the original files"
mkdir $testdir
echo "Create a one block file"
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?
_pwrite_byte 0x61 0 $blksz $testdir/file1 >> $seqres.full
fnr=26 # 2^26 reflink extents should be enough to find a slow op?
mkdir $testdir
echo "Create a one block file"
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?
_pwrite_byte 0x61 0 $blksz $testdir/file1 >> $seqres.full
fnr=26 # 2^26 reflink extents should be enough to find a slow op?
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
rm -f $seqres.full
echo "Silence is golden"
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
# 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
_require_xfs_io_command "falloc"
_require_test_program "dio-interleaved"
_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"
num_extents=1024
testfile="$TEST_DIR/$$-testfile"
echo -n "Comparing holes to the reported space from FS..."
# Get block size
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
sectors_per_block=`expr $block_size / 512`
# Obtain free space from filesystem
mkdir $testdir
echo "Create the original file and reflink to copy1, copy2"
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
_pwrite_byte 0x61 0 $((blksz * 14 + 71)) $testdir/original >> $seqres.full
_cp_reflink $testdir/original $testdir/copy1
_cp_reflink $testdir/copy1 $testdir/copy2
blks=2000
margin=160
blksz=65536
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
blksz_factor=$((blksz / real_blksz))
_pwrite_byte 0x61 0 $((blks * blksz)) $testdir/file1 >> $seqres.full
_cp_reflink $testdir/file1 $testdir/file2
metadump_file=$TEST_DIR/${seq}_metadump
echo "Create the original file blocks"
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
nr_blks=$((4 * blksz / 12))
_pwrite_byte 0x61 0 $((blksz * nr_blks)) $testdir/file1 >> $seqres.full
mkdir $testdir
echo "Create the original file blocks"
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))
blks=2000
margin=100
sz=$((blksz * blks))
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
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))
echo "Create the original files"
sz=$((48 * 1048576))
testdir=$SCRATCH_MNT/test-$seq
mkdir $testdir
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))
echo "Create the original files"
sz=$((48 * 1048576))
mkdir $testdir
echo "Create the original file blocks"
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
nr_blks=$((8 * blksz / 12))
for i in 1 2 x; do
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 2 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
blksz=65536
nr=64
filesize=$((blksz * nr))
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
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
blksz=65536
nr=64
filesize=$((blksz * nr))
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
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
blksz=65536
nr=64
filesize=$((blksz * nr))
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
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
blksz=65536
nr=64
filesize=$((blksz * nr))
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
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
blksz=65536
nr=64
filesize=$((blksz * nr))
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
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
blksz=65536
nr=64
filesize=$((blksz * nr))
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
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
blksz=65536
nr=64
filesize=$((blksz * nr))
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
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
blksz=65536
nr=64
filesize=$((blksz * nr))
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
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
blksz=65536
nr=64
filesize=$((blksz * nr))
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
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
blksz=65536
nr=64
filesize=$((blksz * nr))
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
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
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
mkdir $testdir
echo "Create the original files"
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
_pwrite_byte 0x61 0 $((blksz * 14 + 71)) $testdir/original >> $seqres.full
cp -p $testdir/original $testdir/copy1
cp -p $testdir/copy1 $testdir/copy2
metadump_file=$TEST_DIR/${seq}_metadump
echo "Create the original file blocks"
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
nr_blks=$((4 * blksz / 12))
_pwrite_byte 0x61 0 $((blksz * nr_blks)) $testdir/file1 >> $seqres.full
sync
mkdir $testdir
echo "Create the original file blocks"
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
nr_blks=$((8 * blksz / 12))
for i in 1 2 x; do
mkdir $testdir
echo "Create the original file blocks"
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
nr_blks=$((2 * blksz / 12))
for i in 1 2 x; do
mkdir $testdir
echo "Create the original file blocks"
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
nr_blks=$((2 * blksz / 12))
for i in 1 2 x; do
_scratch_mount >> $seqres.full
testdir=$SCRATCH_MNT/test-$seq
_scratch_mount >> $seqres.full
testdir=$SCRATCH_MNT/test-$seq
-blksz="$(get_block_size $SCRATCH_MNT)"
+blksz="$(_get_block_size $SCRATCH_MNT)"
echo "Create the original file blocks"
mkdir $testdir
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"
$XFS_IO_PROG -f -c "falloc 0 $((nr_blks * blksz))" $testdir/file1 >> $seqres.full
echo "Check extent count"
# 2^10 blocks... that should be plenty for anyone.
fnr=$((12 + LOAD_FACTOR))
free_blocks=$(stat -f -c '%a' "$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()
{
space_avail=$((free_blocks * blksz))
calc_space()
{
echo "+ mount fs image"
_scratch_mount
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.
# btree header is 56 bytes; an rmapbt record is 24 bytes; and
# a rmapbt key/pointer pair is 44 bytes.
. $tmp.mkfs
cat $tmp.mkfs > "$seqres.full" 2>&1
_scratch_mount
. $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;
echo "Create a three-level rtrmapbt"
# inode core size is at least 176 bytes; btree header is 56 bytes;
. $tmp.mkfs
cat $tmp.mkfs > "$seqres.full" 2>&1
_scratch_mount
. $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
metadump_file=$TEST_DIR/${seq}_metadump
rm -rf $metadump_file
echo "+ mount fs image"
_scratch_mount
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.
# 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.
. $tmp.mkfs
cat $tmp.mkfs > "$seqres.full" 2>&1
_scratch_mount
. $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.
# 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.
. $tmp.mkfs
cat $tmp.mkfs > "$seqres.full" 2>&1
_scratch_mount
. $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.
# 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.
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"
bufsize=$((blksz * bufnr))
_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
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"
internal_blks=$((filesize / real_blksz))
echo "Create the original files"