mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
zvol: Enable zvol threading functionality on FreeBSD
Make zvol I/O requests processing asynchronous on FreeBSD side in some cases. Clone zvol threading logic and required module parameters from Linux side. Make zvol threadpool creation/destruction logic shared for both Linux and FreeBSD. The IO requests are processed asynchronously in next cases: - volmode=geom: if IO request thread is geom thread or cannot sleep. - volmode=cdev: if IO request passed thru struct cdevsw .d_strategy routine, mean is AIO request. In all other cases the IO requests are processed synchronously. The volthreading zvol property is ignored on FreeBSD side. Sponsored-by: vStack, Inc. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: @ImAwsumm Signed-off-by: Fedor Uporov <fuporov.vstack@gmail.com> Closes #17169
This commit is contained in:
@@ -3386,17 +3386,21 @@ function set_tunable_impl
|
||||
|
||||
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"
|
||||
if tunable_exists $1 ; then
|
||||
[[ ! -d $TEST_BASE_DIR ]] && return 1
|
||||
[[ -e $TEST_BASE_DIR/tunable-$1 ]] && return 2
|
||||
echo "$(get_tunable """$1""")" > "$TEST_BASE_DIR"/tunable-"$1"
|
||||
fi
|
||||
}
|
||||
|
||||
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
|
||||
if tunable_exists $1 ; then
|
||||
[[ ! -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
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
|
||||
@@ -102,6 +102,7 @@ VDEV_VALIDATE_SKIP vdev.validate_skip vdev_validate_skip
|
||||
VOL_INHIBIT_DEV UNSUPPORTED zvol_inhibit_dev
|
||||
VOL_MODE vol.mode zvol_volmode
|
||||
VOL_RECURSIVE vol.recursive UNSUPPORTED
|
||||
VOL_REQUEST_SYNC zvol_request_sync zvol_request_sync
|
||||
VOL_USE_BLK_MQ UNSUPPORTED zvol_use_blk_mq
|
||||
BCLONE_ENABLED bclone_enabled zfs_bclone_enabled
|
||||
BCLONE_WAIT_DIRTY bclone_wait_dirty zfs_bclone_wait_dirty
|
||||
|
||||
Reference in New Issue
Block a user