]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs/301: Make the test compatible with all the supported block sizes
authorNirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com>
Mon, 25 Aug 2025 06:04:08 +0000 (06:04 +0000)
committerZorro Lang <zlang@kernel.org>
Mon, 25 Aug 2025 15:50:26 +0000 (23:50 +0800)
commit579a65fc0de0c3cf6c5ff7c0e0f0f60b13ab6545
treed7558d89f58d1c3e80ab03171a27db604d4476de
parent9d618786c0d1d6d987f0a8c2dbe516714d6520ad
btrfs/301: Make the test compatible with all the supported block sizes

With large block sizes like 64k the test failed with the
following logs:

     QA output created by 301
     basic accounting
    +subvol 256 mismatched usage 33947648 vs 4587520 (expected data 4194304 expected meta 393216 diff 29360128)
    +subvol 256 mismatched usage 168165376 vs 138805248 (expected data 138412032 expected meta 393216 diff 29360128)
    +subvol 256 mismatched usage 33947648 vs 4587520 (expected data 4194304 expected meta 393216 diff 29360128)
    +subvol 256 mismatched usage 33947648 vs 4587520 (expected data 4194304 expected meta 393216 diff 29360128)
     fallocate: Disk quota exceeded

The test creates nr_fill files each of size 8k. Now with 64k
block size, 8k sized files occupy more than the expected sizes (i.e, 8k)
due to internal fragmentation, since 1 file will occupy at least 1
fsblock. Fix this by making the file size 64k, which is aligned
with all the supported block sizes.

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/btrfs/301