mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
ocfs2/reflink: fix file block size reporting
Some of the reflink tests try to require a specific filesystem block size so that they can test file block manipulation functions. That's straightforward for most filesystems but ocfs2 throws in the additional twist that data fork block mappings are stored in units of clusters, not blocks, which causes these reflink tests to fail. Therefore, introduce a new helper that retrieves the file minimum block size and adapt the reflink tests to use that instead. 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
0bfb84110b
commit
3547db8e84
+1
-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_file_block_size $testdir)
|
||||
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
|
||||
|
||||
echo "Create the original files"
|
||||
|
||||
+1
-1
@@ -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_file_block_size $testdir)
|
||||
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
|
||||
|
||||
echo "Create the original files"
|
||||
|
||||
+1
-1
@@ -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_file_block_size $testdir)
|
||||
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
|
||||
|
||||
echo "Create the original files"
|
||||
|
||||
+1
-1
@@ -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_file_block_size $testdir)
|
||||
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
|
||||
|
||||
echo "Create the original files"
|
||||
|
||||
+1
-1
@@ -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_file_block_size $testdir)
|
||||
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
|
||||
|
||||
echo "Create the original files"
|
||||
|
||||
+1
-1
@@ -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_file_block_size $testdir)
|
||||
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
|
||||
|
||||
echo "Create the original files"
|
||||
|
||||
+1
-1
@@ -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_file_block_size $testdir)
|
||||
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
|
||||
|
||||
echo "Create the original files"
|
||||
|
||||
+1
-1
@@ -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_file_block_size $testdir)
|
||||
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
|
||||
|
||||
echo "Create the original files"
|
||||
|
||||
+1
-1
@@ -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_file_block_size $testdir)
|
||||
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
|
||||
|
||||
runtest() {
|
||||
|
||||
+1
-1
@@ -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_file_block_size $testdir)
|
||||
test $real_blksz != $blksz && _notrun "Failed to format with small blocksize."
|
||||
|
||||
runtest() {
|
||||
|
||||
Reference in New Issue
Block a user