diff mbox series

[7/8] filter: report data block mappings and od offsets in multiples of allocation units

Message ID 165826667582.3249494.4199351742712143400.stgit@magnolia (mailing list archive)
State New, archived
Headers show
Series fstests: check file block congruency of file range operations | expand

Commit Message

Darrick J. Wong July 19, 2022, 9:37 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

All the tests that use these two filter functions also make all of their
fallocate calls in units of file allocation units, not filesystem
blocks.  Make them transform the file offsets to multiples of file
allocation units (via _get_file_block_size) so that xfs/242 and xfs/252
will work with XFS with a rt extent size set.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
---
 common/filter |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/common/filter b/common/filter
index 14f6a027..28dea646 100644
--- a/common/filter
+++ b/common/filter
@@ -221,7 +221,7 @@  _filter_xfs_io_units_modified()
 
 _filter_xfs_io_blocks_modified()
 {
-	BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT)
+	BLOCK_SIZE=$(_get_file_block_size $SCRATCH_MNT)
 
 	_filter_xfs_io_units_modified "Block" $BLOCK_SIZE
 }
@@ -457,7 +457,7 @@  _filter_busy_mount()
 
 _filter_od()
 {
-	BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT)
+	BLOCK_SIZE=$(_get_file_block_size $SCRATCH_MNT)
 	$AWK_PROG -v block_size=$BLOCK_SIZE '
 		/^[0-9]+/ {
 			offset = strtonum("0"$1);