generic/{094,225}: skip test when the xfs rt extent size is larger than 1 fsb
[xfstests-dev.git] / common / rc
index aa4ea7d4dd7be94144bd5a234006e51d4029a6a0..4d3397d681d3b6ef5f60f69b73aecab1300c945a 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -4131,6 +4131,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)