mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Add a tunable to disable BRT support.
Copy the disable parameter that FreeBSD implemented, and extend it to work on Linux as well, until we're sure this is stable. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes #15529
This commit is contained in:
@@ -3334,6 +3334,21 @@ function set_tunable_impl
|
||||
esac
|
||||
}
|
||||
|
||||
function save_tunable
|
||||
{
|
||||
[[ ! -d $TEST_BASE_DIR ]] && return 1
|
||||
[[ -e $TEST_BASE_DIR/tunable-$1 ]] && return 2
|
||||
echo "$(get_tunable """$1""")" > "$TEST_BASE_DIR"/tunable-"$1"
|
||||
}
|
||||
|
||||
function restore_tunable
|
||||
{
|
||||
[[ ! -e $TEST_BASE_DIR/tunable-$1 ]] && return 1
|
||||
val="$(cat $TEST_BASE_DIR/tunable-"""$1""")"
|
||||
set_tunable64 "$1" "$val"
|
||||
rm $TEST_BASE_DIR/tunable-$1
|
||||
}
|
||||
|
||||
#
|
||||
# Get a global system tunable
|
||||
#
|
||||
|
||||
@@ -93,6 +93,7 @@ VOL_INHIBIT_DEV UNSUPPORTED zvol_inhibit_dev
|
||||
VOL_MODE vol.mode zvol_volmode
|
||||
VOL_RECURSIVE vol.recursive UNSUPPORTED
|
||||
VOL_USE_BLK_MQ UNSUPPORTED zvol_use_blk_mq
|
||||
BCLONE_ENABLED zfs_bclone_enabled zfs_bclone_enabled
|
||||
XATTR_COMPAT xattr_compat zfs_xattr_compat
|
||||
ZEVENT_LEN_MAX zevent.len_max zfs_zevent_len_max
|
||||
ZEVENT_RETAIN_MAX zevent.retain_max zfs_zevent_retain_max
|
||||
|
||||
@@ -31,4 +31,8 @@ verify_runnable "global"
|
||||
|
||||
default_cleanup_noexit
|
||||
|
||||
if tunable_exists BCLONE_ENABLED ; then
|
||||
log_must restore_tunable BCLONE_ENABLED
|
||||
fi
|
||||
|
||||
log_pass
|
||||
|
||||
@@ -33,4 +33,9 @@ fi
|
||||
|
||||
verify_runnable "global"
|
||||
|
||||
if tunable_exists BCLONE_ENABLED ; then
|
||||
log_must save_tunable BCLONE_ENABLED
|
||||
log_must set_tunable32 BCLONE_ENABLED 1
|
||||
fi
|
||||
|
||||
log_pass
|
||||
|
||||
Reference in New Issue
Block a user