diff options
author | Matthew Macy <[email protected]> | 2019-09-05 14:49:49 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-09-05 14:49:49 -0700 |
commit | 03fdcb9adc596fb86a65edb56d8088b77ea2d891 (patch) | |
tree | c68cec08565296ad37d53677fdfbc4d5c6e7ef7d /module/zfs/vdev_cache.c | |
parent | 65a91b166e66a57c44b62bb5ca20ccb6f0ecc46d (diff) |
Make module tunables cross platform
Adds ZFS_MODULE_PARAM to abstract module parameter
setting to operating systems other than Linux.
Reviewed-by: Jorgen Lundman <[email protected]>
Reviewed-by: Igor Kozhukhov <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #9230
Diffstat (limited to 'module/zfs/vdev_cache.c')
-rw-r--r-- | module/zfs/vdev_cache.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/module/zfs/vdev_cache.c b/module/zfs/vdev_cache.c index b63b9f979..35a5b480b 100644 --- a/module/zfs/vdev_cache.c +++ b/module/zfs/vdev_cache.c @@ -425,13 +425,13 @@ vdev_cache_stat_fini(void) } } -#if defined(_KERNEL) -module_param(zfs_vdev_cache_max, int, 0644); -MODULE_PARM_DESC(zfs_vdev_cache_max, "Inflate reads small than max"); +/* BEGIN CSTYLED */ +ZFS_MODULE_PARAM(zfs_vdev, zfs_vdev_, cache_max, INT, ZMOD_RW, + "Inflate reads small than max"); -module_param(zfs_vdev_cache_size, int, 0444); -MODULE_PARM_DESC(zfs_vdev_cache_size, "Total size of the per-disk cache"); +ZFS_MODULE_PARAM(zfs_vdev, zfs_vdev_, cache_size, INT, ZMOD_RD, + "Total size of the per-disk cache"); -module_param(zfs_vdev_cache_bshift, int, 0644); -MODULE_PARM_DESC(zfs_vdev_cache_bshift, "Shift size to inflate reads too"); -#endif +ZFS_MODULE_PARAM(zfs_vdev, zfs_vdev_, cache_bshift, INT, ZMOD_RW, + "Shift size to inflate reads too"); +/* END CSTYLED */ |