mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-06-25 10:38:00 +03:00
tunables: remove direct use of module_param_cb
The use for spl_taskq_kick was the only use, and the comment that module_param_call is obsolete is no longer true - it's still very much used even in recent kernels. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Pavel Snajdr <snajpa@snajpa.net> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #17377
This commit is contained in:
parent
7b183f1918
commit
58235f52af
@ -37,6 +37,7 @@
|
|||||||
#include <sys/atomic.h>
|
#include <sys/atomic.h>
|
||||||
#include <sys/kstat.h>
|
#include <sys/kstat.h>
|
||||||
#include <linux/cpuhotplug.h>
|
#include <linux/cpuhotplug.h>
|
||||||
|
#include <linux/mod_compat.h>
|
||||||
|
|
||||||
/* Linux 6.2 renamed timer_delete_sync(); point it at its old name for those. */
|
/* Linux 6.2 renamed timer_delete_sync(); point it at its old name for those. */
|
||||||
#ifndef HAVE_TIMER_DELETE_SYNC
|
#ifndef HAVE_TIMER_DELETE_SYNC
|
||||||
@ -1651,18 +1652,8 @@ spl_taskq_kstat_fini(void)
|
|||||||
|
|
||||||
static unsigned int spl_taskq_kick = 0;
|
static unsigned int spl_taskq_kick = 0;
|
||||||
|
|
||||||
/*
|
|
||||||
* 2.6.36 API Change
|
|
||||||
* module_param_cb is introduced to take kernel_param_ops and
|
|
||||||
* module_param_call is marked as obsolete. Also set and get operations
|
|
||||||
* were changed to take a 'const struct kernel_param *'.
|
|
||||||
*/
|
|
||||||
static int
|
static int
|
||||||
#ifdef module_param_cb
|
param_set_taskq_kick(const char *val, zfs_kernel_param_t *kp)
|
||||||
param_set_taskq_kick(const char *val, const struct kernel_param *kp)
|
|
||||||
#else
|
|
||||||
param_set_taskq_kick(const char *val, struct kernel_param *kp)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
taskq_t *tq = NULL;
|
taskq_t *tq = NULL;
|
||||||
@ -1692,16 +1683,8 @@ param_set_taskq_kick(const char *val, struct kernel_param *kp)
|
|||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef module_param_cb
|
|
||||||
static const struct kernel_param_ops param_ops_taskq_kick = {
|
|
||||||
.set = param_set_taskq_kick,
|
|
||||||
.get = param_get_uint,
|
|
||||||
};
|
|
||||||
module_param_cb(spl_taskq_kick, ¶m_ops_taskq_kick, &spl_taskq_kick, 0644);
|
|
||||||
#else
|
|
||||||
module_param_call(spl_taskq_kick, param_set_taskq_kick, param_get_uint,
|
module_param_call(spl_taskq_kick, param_set_taskq_kick, param_get_uint,
|
||||||
&spl_taskq_kick, 0644);
|
&spl_taskq_kick, 0644);
|
||||||
#endif
|
|
||||||
MODULE_PARM_DESC(spl_taskq_kick,
|
MODULE_PARM_DESC(spl_taskq_kick,
|
||||||
"Write nonzero to kick stuck taskqs to spawn more threads");
|
"Write nonzero to kick stuck taskqs to spawn more threads");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user