@@ -4062,6 +4062,16 @@ _get_block_size()
stat -f -c %S $1
}
+# Require that the fundamental allocation unit of a file is the same as the
+# filesystem block size.
+_require_file_block_size_equals_fs_block_size()
+{
+ local file_alloc_unit="$(_get_file_block_size $1)"
+ local fs_block_size="$(_get_block_size $1)"
+ test "$file_alloc_unit" != "$fs_block_size" && \
+ _notrun "File allocation unit is larger than a filesystem block"
+}
+
get_page_size()
{
echo $(getconf PAGE_SIZE)
@@ -40,6 +40,11 @@ fiemapfile=$SCRATCH_MNT/$seq.fiemap
_require_test_program "fiemap-tester"
+# FIEMAP test doesn't like finding unwritten blocks after it punches out
+# a partial rt extent.
+test "$FSTYP" = "xfs" && \
+ _require_file_block_size_equals_fs_block_size $fiemapfile
+
seed=`date +%s`
echo "using seed $seed" >> $seqres.full
@@ -40,6 +40,11 @@ fiemaplog=$SCRATCH_MNT/$seq.log
_require_test_program "fiemap-tester"
+# FIEMAP test doesn't like finding unwritten blocks after it punches out
+# a partial rt extent.
+test "$FSTYP" = "xfs" && \
+ _require_file_block_size_equals_fs_block_size $fiemapfile
+
seed=`date +%s`
echo "using seed $seed" >> $fiemaplog