mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-26 12:12:13 +03:00
Make module tunables cross platform
Adds ZFS_MODULE_PARAM to abstract module parameter setting to operating systems other than Linux. Reviewed-by: Jorgen Lundman <lundman@lundman.net> Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Signed-off-by: Ryan Moeller <ryan@ixsystems.com> Closes #9230
This commit is contained in:
committed by
Brian Behlendorf
parent
65a91b166e
commit
03fdcb9adc
@@ -611,17 +611,19 @@ spa_config_update(spa_t *spa, int what)
|
||||
spa_config_update(spa, SPA_CONFIG_UPDATE_VDEVS);
|
||||
}
|
||||
|
||||
#if defined(_KERNEL)
|
||||
EXPORT_SYMBOL(spa_config_load);
|
||||
EXPORT_SYMBOL(spa_all_configs);
|
||||
EXPORT_SYMBOL(spa_config_set);
|
||||
EXPORT_SYMBOL(spa_config_generate);
|
||||
EXPORT_SYMBOL(spa_config_update);
|
||||
|
||||
module_param(spa_config_path, charp, 0444);
|
||||
MODULE_PARM_DESC(spa_config_path, "SPA config file (/etc/zfs/zpool.cache)");
|
||||
|
||||
module_param(zfs_autoimport_disable, int, 0644);
|
||||
MODULE_PARM_DESC(zfs_autoimport_disable, "Disable pool import at module load");
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#ifdef __linux__
|
||||
/* string sysctls require a char array on FreeBSD */
|
||||
ZFS_MODULE_PARAM(zfs_spa, spa_, config_path, STRING, ZMOD_RD,
|
||||
"SPA config file (/etc/zfs/zpool.cache)");
|
||||
#endif
|
||||
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, autoimport_disable, INT, ZMOD_RW,
|
||||
"Disable pool import at module load");
|
||||
/* END CSTYLED */
|
||||
|
||||
Reference in New Issue
Block a user