mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
reflink: change to relative margins
NFS uses 32K blocks and thus the numbers used for sanity checking various reflink operations are way off. Change to relative margings and increase them a bit to make NFS happy. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
06d19b018d
commit
911efb0897
+1
-1
@@ -57,7 +57,7 @@ mkdir "$testdir"
|
|||||||
echo "Create the original file blocks"
|
echo "Create the original file blocks"
|
||||||
blksz="$(stat -f $testdir -c '%S')"
|
blksz="$(stat -f $testdir -c '%S')"
|
||||||
blks=2000
|
blks=2000
|
||||||
margin=100
|
margin='15%'
|
||||||
sz=$((blksz * blks))
|
sz=$((blksz * blks))
|
||||||
nr=7
|
nr=7
|
||||||
_pwrite_byte 0x61 0 $sz "$testdir/file1" >> "$seqres.full"
|
_pwrite_byte 0x61 0 $sz "$testdir/file1" >> "$seqres.full"
|
||||||
|
|||||||
+1
-1
@@ -61,7 +61,7 @@ mkdir "$testdir"
|
|||||||
echo "Create the original file blocks"
|
echo "Create the original file blocks"
|
||||||
blksz="$(stat -f "$testdir" -c '%S')"
|
blksz="$(stat -f "$testdir" -c '%S')"
|
||||||
blks=2000
|
blks=2000
|
||||||
margin=100
|
margin='15%'
|
||||||
sz=$((blksz * blks))
|
sz=$((blksz * blks))
|
||||||
free_blocks0=$(stat -f "$testdir" -c '%f')
|
free_blocks0=$(stat -f "$testdir" -c '%f')
|
||||||
nr=7
|
nr=7
|
||||||
|
|||||||
+1
-1
@@ -62,7 +62,7 @@ mkdir "$testdir"
|
|||||||
echo "Create the original file blocks"
|
echo "Create the original file blocks"
|
||||||
blksz="$(stat -f "$testdir" -c '%S')"
|
blksz="$(stat -f "$testdir" -c '%S')"
|
||||||
blks=2000
|
blks=2000
|
||||||
margin=100
|
margin='15%'
|
||||||
sz=$((blksz * blks))
|
sz=$((blksz * blks))
|
||||||
free_blocks0=$(stat -f "$testdir" -c '%f')
|
free_blocks0=$(stat -f "$testdir" -c '%f')
|
||||||
nr=4
|
nr=4
|
||||||
|
|||||||
+1
-1
@@ -62,7 +62,7 @@ mkdir "$testdir"
|
|||||||
echo "Create the original file blocks"
|
echo "Create the original file blocks"
|
||||||
blksz="$(stat -f "$testdir" -c '%S')"
|
blksz="$(stat -f "$testdir" -c '%S')"
|
||||||
blks=2000
|
blks=2000
|
||||||
margin=100
|
margin='15%'
|
||||||
sz=$((blksz * blks))
|
sz=$((blksz * blks))
|
||||||
free_blocks0=$(stat -f "$testdir" -c '%f')
|
free_blocks0=$(stat -f "$testdir" -c '%f')
|
||||||
nr=4
|
nr=4
|
||||||
|
|||||||
+1
-1
@@ -61,7 +61,7 @@ mkdir "$testdir"
|
|||||||
echo "Create the original file blocks"
|
echo "Create the original file blocks"
|
||||||
blksz="$(stat -f "$testdir" -c '%S')"
|
blksz="$(stat -f "$testdir" -c '%S')"
|
||||||
blks=2000
|
blks=2000
|
||||||
margin=100
|
margin='15%'
|
||||||
free_blocks0=$(stat -f "$testdir" -c '%f')
|
free_blocks0=$(stat -f "$testdir" -c '%f')
|
||||||
nr=4
|
nr=4
|
||||||
sz=$((blks * blksz))
|
sz=$((blks * blksz))
|
||||||
|
|||||||
+1
-1
@@ -65,7 +65,7 @@ mkdir $testdir
|
|||||||
echo "Create the original file blocks"
|
echo "Create the original file blocks"
|
||||||
blksz="$(stat -f "$testdir" -c '%S')"
|
blksz="$(stat -f "$testdir" -c '%S')"
|
||||||
blks=2000
|
blks=2000
|
||||||
margin=100
|
margin='15%'
|
||||||
sz=$((blksz * blks))
|
sz=$((blksz * blks))
|
||||||
free_blocks0=$(stat -f "$testdir" -c '%f')
|
free_blocks0=$(stat -f "$testdir" -c '%f')
|
||||||
nr=4
|
nr=4
|
||||||
|
|||||||
+1
-1
@@ -73,7 +73,7 @@ mkdir "$testdir"
|
|||||||
echo "Create the original file blocks"
|
echo "Create the original file blocks"
|
||||||
blksz="$(stat -f "$testdir" -c '%S')"
|
blksz="$(stat -f "$testdir" -c '%S')"
|
||||||
blks=2000
|
blks=2000
|
||||||
margin=100
|
margin='15%'
|
||||||
sz=$((blksz * blks))
|
sz=$((blksz * blks))
|
||||||
free_blocks0=$(stat -f "$testdir" -c '%f')
|
free_blocks0=$(stat -f "$testdir" -c '%f')
|
||||||
nr=4
|
nr=4
|
||||||
|
|||||||
+1
-1
@@ -63,7 +63,7 @@ mkdir "$testdir2"
|
|||||||
echo "Create the original files"
|
echo "Create the original files"
|
||||||
blksz="$(stat -f $testdir1 -c '%S')"
|
blksz="$(stat -f $testdir1 -c '%S')"
|
||||||
blks=1000
|
blks=1000
|
||||||
margin=50
|
margin='7%'
|
||||||
sz=$((blksz * blks))
|
sz=$((blksz * blks))
|
||||||
free_blocks0=$(stat -f $testdir1 -c '%f')
|
free_blocks0=$(stat -f $testdir1 -c '%f')
|
||||||
nr=4
|
nr=4
|
||||||
|
|||||||
+1
-1
@@ -63,7 +63,7 @@ mkdir "$testdir2"
|
|||||||
echo "Create the original files"
|
echo "Create the original files"
|
||||||
blksz="$(stat -f $testdir1 -c '%S')"
|
blksz="$(stat -f $testdir1 -c '%S')"
|
||||||
blks=1000
|
blks=1000
|
||||||
margin=50
|
margin='7%'
|
||||||
sz=$((blksz * blks))
|
sz=$((blksz * blks))
|
||||||
free_blocks0=$(stat -f $testdir1 -c '%f')
|
free_blocks0=$(stat -f $testdir1 -c '%f')
|
||||||
nr=4
|
nr=4
|
||||||
|
|||||||
+1
-1
@@ -56,7 +56,7 @@ mkdir "$testdir1"
|
|||||||
echo "Create the original files"
|
echo "Create the original files"
|
||||||
blksz="$(stat -f $testdir1 -c '%S')"
|
blksz="$(stat -f $testdir1 -c '%S')"
|
||||||
blks=1000
|
blks=1000
|
||||||
margin=50
|
margin='7%'
|
||||||
sz=$((blksz * blks))
|
sz=$((blksz * blks))
|
||||||
free_blocks0=$(stat -f $testdir1 -c '%f')
|
free_blocks0=$(stat -f $testdir1 -c '%f')
|
||||||
nr=4
|
nr=4
|
||||||
|
|||||||
+1
-1
@@ -56,7 +56,7 @@ mkdir "$testdir1"
|
|||||||
echo "Create the original files"
|
echo "Create the original files"
|
||||||
blksz="$(stat -f $testdir1 -c '%S')"
|
blksz="$(stat -f $testdir1 -c '%S')"
|
||||||
blks=1000
|
blks=1000
|
||||||
margin=50
|
margin='7%'
|
||||||
sz=$((blksz * blks))
|
sz=$((blksz * blks))
|
||||||
free_blocks0=$(stat -f $testdir1 -c '%f')
|
free_blocks0=$(stat -f $testdir1 -c '%f')
|
||||||
nr=4
|
nr=4
|
||||||
|
|||||||
Reference in New Issue
Block a user