From 4848a0898e51a7b1483f974ac5be0061fe966481 Mon Sep 17 00:00:00 2001 From: Rob N Date: Sat, 7 Oct 2023 02:39:20 +1100 Subject: [PATCH] tests/block_cloning: sync before write in fallback test We're still seeing this test fail intermittently (that is, the clone happens), which must mean the write and the clone can still be happening on different txgs. It might be that there's still activity after the pool is created. So here we force a sync before starting the write. Sponsored-By: Klara Inc. Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #15359 --- .../block_cloning_copyfilerange_fallback_same_txg.ksh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh b/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh index 2cd2f4763a73..e52b34ec8a51 100755 --- a/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh +++ b/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh @@ -52,6 +52,8 @@ log_must set_tunable64 TXG_TIMEOUT 5000 log_must zpool create -o feature@block_cloning=enabled $TESTPOOL $DISKS +log_must sync_pool $TESTPOOL true + log_must dd if=/dev/urandom of=/$TESTPOOL/file bs=128K count=4 log_must clonefile -f /$TESTPOOL/file /$TESTPOOL/clone 0 0 524288