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/zio.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/zio.c')
-rw-r--r-- | module/zfs/zio.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/module/zfs/zio.c b/module/zfs/zio.c index 7b4ab341f..f966023aa 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -4842,37 +4842,31 @@ zbookmark_subtree_completed(const dnode_phys_t *dnp, last_block) <= 0); } -#if defined(_KERNEL) EXPORT_SYMBOL(zio_type_name); EXPORT_SYMBOL(zio_buf_alloc); EXPORT_SYMBOL(zio_data_buf_alloc); EXPORT_SYMBOL(zio_buf_free); EXPORT_SYMBOL(zio_data_buf_free); -module_param(zio_slow_io_ms, int, 0644); -MODULE_PARM_DESC(zio_slow_io_ms, +/* BEGIN CSTYLED */ +ZFS_MODULE_PARAM(zfs_zio, zio_, slow_io_ms, INT, ZMOD_RW, "Max I/O completion time (milliseconds) before marking it as slow"); -module_param(zio_requeue_io_start_cut_in_line, int, 0644); -MODULE_PARM_DESC(zio_requeue_io_start_cut_in_line, "Prioritize requeued I/O"); +ZFS_MODULE_PARAM(zfs_zio, zio_, requeue_io_start_cut_in_line, INT, ZMOD_RW, + "Prioritize requeued I/O"); -module_param(zfs_sync_pass_deferred_free, int, 0644); -MODULE_PARM_DESC(zfs_sync_pass_deferred_free, +ZFS_MODULE_PARAM(zfs, zfs_, sync_pass_deferred_free, INT, ZMOD_RW, "Defer frees starting in this pass"); -module_param(zfs_sync_pass_dont_compress, int, 0644); -MODULE_PARM_DESC(zfs_sync_pass_dont_compress, +ZFS_MODULE_PARAM(zfs, zfs_, sync_pass_dont_compress, INT, ZMOD_RW, "Don't compress starting in this pass"); -module_param(zfs_sync_pass_rewrite, int, 0644); -MODULE_PARM_DESC(zfs_sync_pass_rewrite, +ZFS_MODULE_PARAM(zfs, zfs_, sync_pass_rewrite, INT, ZMOD_RW, "Rewrite new bps starting in this pass"); -module_param(zio_dva_throttle_enabled, int, 0644); -MODULE_PARM_DESC(zio_dva_throttle_enabled, +ZFS_MODULE_PARAM(zfs_zio, zio_, dva_throttle_enabled, INT, ZMOD_RW, "Throttle block allocations in the ZIO pipeline"); -module_param(zio_deadman_log_all, int, 0644); -MODULE_PARM_DESC(zio_deadman_log_all, +ZFS_MODULE_PARAM(zfs_zio, zio_, deadman_log_all, INT, ZMOD_RW, "Log all slow ZIOs, not just those with vdevs"); -#endif +/* END CSTYLED */ |