mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common: add leading underscore to get_block_size
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>
This commit is contained in:
committed by
Eryu Guan
parent
daedb4dc13
commit
0bfb84110b
+1
-1
@@ -63,7 +63,7 @@ _require_command "$E2FSCK_PROG" e2fsck
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
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 || \
|
||||
|
||||
+1
-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 \
|
||||
|
||||
+1
-1
@@ -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))
|
||||
|
||||
|
||||
+1
-1
@@ -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))
|
||||
|
||||
|
||||
+1
-1
@@ -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))
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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))" \
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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))
|
||||
|
||||
|
||||
+1
-1
@@ -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"
|
||||
|
||||
+1
-1
@@ -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))
|
||||
|
||||
+1
-1
@@ -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))
|
||||
|
||||
+1
-1
@@ -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))
|
||||
|
||||
+1
-1
@@ -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))
|
||||
|
||||
+1
-1
@@ -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')
|
||||
|
||||
+1
-1
@@ -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))
|
||||
|
||||
+1
-1
@@ -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))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user