From 03fdcb9adc596fb86a65edb56d8088b77ea2d891 Mon Sep 17 00:00:00 2001 From: Matthew Macy Date: Thu, 5 Sep 2019 14:49:49 -0700 Subject: Make module tunables cross platform Adds ZFS_MODULE_PARAM to abstract module parameter setting to operating systems other than Linux. Reviewed-by: Jorgen Lundman Reviewed-by: Igor Kozhukhov Reviewed-by: Brian Behlendorf Signed-off-by: Matt Macy Signed-off-by: Ryan Moeller Closes #9230 --- module/zfs/spa_checkpoint.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'module/zfs/spa_checkpoint.c') diff --git a/module/zfs/spa_checkpoint.c b/module/zfs/spa_checkpoint.c index 44711acef..b167a8321 100644 --- a/module/zfs/spa_checkpoint.c +++ b/module/zfs/spa_checkpoint.c @@ -624,15 +624,12 @@ spa_checkpoint_discard(const char *pool) ZFS_SPACE_CHECK_DISCARD_CHECKPOINT)); } -#if defined(_KERNEL) EXPORT_SYMBOL(spa_checkpoint_get_stats); EXPORT_SYMBOL(spa_checkpoint_discard_thread); EXPORT_SYMBOL(spa_checkpoint_discard_thread_check); /* BEGIN CSTYLED */ -module_param(zfs_spa_discard_memory_limit, ulong, 0644); -MODULE_PARM_DESC(zfs_spa_discard_memory_limit, - "Maximum memory for prefetching checkpoint space " - "map per top-level vdev while discarding checkpoint"); +ZFS_MODULE_PARAM(zfs_spa, zfs_spa_, discard_memory_limit, ULONG, ZMOD_RW, + "Limit for memory used in prefetching the checkpoint space map done " + "on each vdev while discarding the checkpoint"); /* END CSTYLED */ -#endif -- cgit v1.2.3