ZVOL: Make zvol_prefetch_bytes module parameter platform-independent

The module parameter now is represented in FreeBSD sysctls list
with name: 'vfs.zfs.vol.prefetch_bytes'. The default value is 131072,
same as on Linux side.

Sponsored-by: vStack, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Signed-off-by: Fedor Uporov <fuporov.vstack@gmail.com>
Closes #17385
This commit is contained in:
Fedor Uporov
2025-05-31 16:58:54 +03:00
committed by GitHub
parent e8e602d987
commit e1677d9ee1
4 changed files with 12 additions and 7 deletions
+3
View File
@@ -89,6 +89,7 @@
#include <sys/zvol_impl.h>
unsigned int zvol_inhibit_dev = 0;
unsigned int zvol_prefetch_bytes = (128 * 1024);
unsigned int zvol_volmode = ZFS_VOLMODE_GEOM;
unsigned int zvol_threads = 0;
unsigned int zvol_num_taskqs = 0;
@@ -2156,6 +2157,8 @@ zvol_fini_impl(void)
ZFS_MODULE_PARAM(zfs_vol, zvol_, inhibit_dev, UINT, ZMOD_RW,
"Do not create zvol device nodes");
ZFS_MODULE_PARAM(zfs_vol, zvol_, prefetch_bytes, UINT, ZMOD_RW,
"Prefetch N bytes at zvol start+end");
ZFS_MODULE_PARAM(zfs_vol, zvol_, threads, UINT, ZMOD_RW,
"Number of threads for I/O requests. Set to 0 to use all active CPUs");
ZFS_MODULE_PARAM(zfs_vol, zvol_, num_taskqs, UINT, ZMOD_RW,