From 579a65fc0de0c3cf6c5ff7c0e0f0f60b13ab6545 Mon Sep 17 00:00:00 2001 From: "Nirjhar Roy (IBM)" Date: Mon, 25 Aug 2025 06:04:08 +0000 Subject: [PATCH] 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 Reviewed-by: Ojaswin Mujoo Reported-by: Disha Goel Signed-off-by: Nirjhar Roy (IBM) Tested-by: Disha Goel Signed-off-by: Zorro Lang --- tests/btrfs/301 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/btrfs/301 b/tests/btrfs/301 index 4c0ba119..692091a3 100755 --- a/tests/btrfs/301 +++ b/tests/btrfs/301 @@ -28,7 +28,7 @@ subv=$SCRATCH_MNT/subv nested=$SCRATCH_MNT/subv/nested snap=$SCRATCH_MNT/snap nr_fill=512 -fill_sz=$((8 * 1024)) +fill_sz=$((64 * 1024)) total_fill=$(($nr_fill * $fill_sz)) nodesize=$($BTRFS_UTIL_PROG inspect-internal dump-super $SCRATCH_DEV | \ grep nodesize | $AWK_PROG '{print $2}') -- 2.39.5