From: Nirjhar Roy (IBM) Date: Mon, 13 Oct 2025 05:39:42 +0000 (+0000) Subject: generic/562: Make test compatible with block sizes till 64k X-Git-Tag: v2025.10.20~17 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6a81db9f18093a72710a118e10987ec3459512b5;p=xfstests-dev.git generic/562: Make test compatible with block sizes till 64k This test fails with 64k sector size in btrfs. The reason for this is the need for additional space because of COW. When the reflink/clone of file bar into file foo is done, there is no additional space left for COW - the reason is that the metadata space usage is much higher with 64k node size. In order to verify this, I instrumented the test script and disabled COW for file foo and bar and the test passes in 64k (and runs faster too). With 64k sector and node size (COW enabled) After pwriting foo and bar and before filling up the fs Filesystem Size Used Avail Use% Mounted on /dev/loop1 512M 324M 3.0M 100% /mnt1/scratch After filling up the fs Filesystem Size Used Avail Use% Mounted on /dev/loop1 512M 441M 3.0M 100% /mnt1/scratch With 64k sector and node size (COW disabled) After pwriting foo and bar and before filling up the fs Filesystem Size Used Avail Use% Mounted on /dev/loop1 512M 224M 231M 50% /mnt1/scratch After filling up the fs Filesystem Size Used Avail Use% Mounted on /dev/loop1 512M 424M 31M 94% /mnt1/scratch As we can see, with COW, the fs is completely full after filling up the fs but with COW disabled, we have some space left. Fix this by increasing the fs size to 590M so that even with 64k node size and COW enabled, reflink has enough space to continue. Reported-by: Disha Goel Signed-off-by: Nirjhar Roy (IBM) Reviewed-by: Filipe Manana Signed-off-by: Zorro Lang --- diff --git a/tests/generic/562 b/tests/generic/562 index 03a66ff2..b9562730 100755 --- a/tests/generic/562 +++ b/tests/generic/562 @@ -22,7 +22,7 @@ _require_scratch_reflink _require_test_program "punch-alternating" _require_xfs_io_command "fpunch" -_scratch_mkfs_sized $((512 * 1024 * 1024)) >>$seqres.full 2>&1 +_scratch_mkfs_sized $((590 * 1024 * 1024)) >>$seqres.full 2>&1 _scratch_mount file_size=$(( 200 * 1024 * 1024 )) # 200Mb