]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
xfs/558: scale blk IO size based on the filesystem blksz
authorPankaj Raghav <p.raghav@samsung.com>
Wed, 13 Mar 2024 20:38:18 +0000 (21:38 +0100)
committerZorro Lang <zlang@kernel.org>
Wed, 27 Mar 2024 14:05:18 +0000 (22:05 +0800)
This test fails for 64k filesystem block size on a 4k PAGE_SIZE
system. Scale the `blksz` based on the filesystem block size instead of
fixing it as 64k so that we do get some iomap invalidations while doing
concurrent writes.

Cap the blksz to be at least 64k to retain the same behaviour as before
for smaller filesystem blocksizes.

This fixes the "Expected to hear about writeback iomap invalidations?"
message for 64k filesystems.

Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Tested-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/558

index 9e9b3be867fb9b7ca25754a3ff55813ef5537501..270f458cb991c4f7e810ca872cdc189ba848b011 100755 (executable)
@@ -127,7 +127,12 @@ _scratch_mount >> $seqres.full
 $XFS_IO_PROG -c 'chattr -x' $SCRATCH_MNT &> $seqres.full
 _require_pagecache_access $SCRATCH_MNT
 
-blksz=65536
+min_blksz=65536
+file_blksz=$(_get_file_block_size "$SCRATCH_MNT")
+blksz=$(( 8 * $file_blksz ))
+
+blksz=$(( blksz > min_blksz ? blksz : min_blksz ))
+
 _require_congruent_file_oplen $SCRATCH_MNT $blksz
 
 # Make sure we have sufficient extent size to create speculative CoW