]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic/274: Make the pwrite block sizes and offsets to 64k
authorNirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com>
Mon, 25 Aug 2025 06:04:09 +0000 (06:04 +0000)
committerZorro Lang <zlang@kernel.org>
Mon, 25 Aug 2025 15:50:26 +0000 (23:50 +0800)
commitd6506d38a3ee8a947ba5f22a5c723bdac45c5917
tree99a1d02c5761485f1f2da32e2082ffdd486dbeb7
parent579a65fc0de0c3cf6c5ff7c0e0f0f60b13ab6545
generic/274: Make the pwrite block sizes and offsets to 64k

This test was written with 4k block size in mind and it fails with
64k block size when tested with btrfs.
The test first does pre-allocation, then fills up the
filesystem. After that it tries to fragment and fill holes at offsets
of 4k(i.e, 1 fsblock) - which works fine with 4k block size, but with
64k block size, the test tries to fragment and fill holes within
1 fsblock(of size 64k). This results in overwrite of 64k fsblocks
and the write fails. The reason for this failure is that during
overwrite, there is no more space available for COW.
Fix this by changing the pwrite block size and offsets to 64k
so that the test never tries to punch holes or overwrite within 1 fsblock
and the test becomes compatible with all block sizes.

For non-COW filesystems/files, this test should work even if the
underlying filesytem block size > 64k.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Reported-by: Disha Goel <disgoel@linux.ibm.com>
Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com>
Tested-by: Disha Goel <disgoel@linux.ibm.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/274