From b699dacb4ac8bb7622943ae8587474dbe1fc81b1 Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Mon, 12 Feb 2024 13:06:09 -0800 Subject: [PATCH] [zfs-2.2.3] Enable zfs_bclone_enabled on cp_files tests cp_files_002_pos uses BRT, so enable block cloning in setup/cleanup. This is only something we need to do in zfs-2.2.3, since 2.2.x ships with block cloning disabled by default. Signed-off-by: Tony Hutter --- tests/zfs-tests/tests/functional/cp_files/cleanup.ksh | 4 ++++ tests/zfs-tests/tests/functional/cp_files/setup.ksh | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/tests/zfs-tests/tests/functional/cp_files/cleanup.ksh b/tests/zfs-tests/tests/functional/cp_files/cleanup.ksh index 42fe70042..c0bccab12 100755 --- a/tests/zfs-tests/tests/functional/cp_files/cleanup.ksh +++ b/tests/zfs-tests/tests/functional/cp_files/cleanup.ksh @@ -32,3 +32,7 @@ . $STF_SUITE/include/libtest.shlib default_cleanup + +if tunable_exists BCLONE_ENABLED ; then + log_must restore_tunable BCLONE_ENABLED +fi diff --git a/tests/zfs-tests/tests/functional/cp_files/setup.ksh b/tests/zfs-tests/tests/functional/cp_files/setup.ksh index b756d4e76..4223386b3 100755 --- a/tests/zfs-tests/tests/functional/cp_files/setup.ksh +++ b/tests/zfs-tests/tests/functional/cp_files/setup.ksh @@ -32,4 +32,10 @@ . $STF_SUITE/include/libtest.shlib DISK=${DISKS%% *} + +if tunable_exists BCLONE_ENABLED ; then + log_must save_tunable BCLONE_ENABLED + log_must set_tunable32 BCLONE_ENABLED 1 +fi + default_setup $DISK