mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +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
+11
-16
@@ -1858,7 +1858,6 @@ vdev_ops_t vdev_indirect_ops = {
|
||||
.vdev_op_leaf = B_FALSE /* leaf vdev */
|
||||
};
|
||||
|
||||
#if defined(_KERNEL)
|
||||
EXPORT_SYMBOL(rs_alloc);
|
||||
EXPORT_SYMBOL(spa_condense_fini);
|
||||
EXPORT_SYMBOL(spa_start_indirect_condensing_thread);
|
||||
@@ -1871,25 +1870,21 @@ EXPORT_SYMBOL(vdev_indirect_sync_obsolete);
|
||||
EXPORT_SYMBOL(vdev_obsolete_counts_are_precise);
|
||||
EXPORT_SYMBOL(vdev_obsolete_sm_object);
|
||||
|
||||
module_param(zfs_condense_indirect_vdevs_enable, int, 0644);
|
||||
MODULE_PARM_DESC(zfs_condense_indirect_vdevs_enable,
|
||||
/* BEGIN CSTYLED */
|
||||
ZFS_MODULE_PARAM(zfs_condense, zfs_condense_, indirect_vdevs_enable, INT, ZMOD_RW,
|
||||
"Whether to attempt condensing indirect vdev mappings");
|
||||
|
||||
/* CSTYLED */
|
||||
module_param(zfs_condense_min_mapping_bytes, ulong, 0644);
|
||||
MODULE_PARM_DESC(zfs_condense_min_mapping_bytes,
|
||||
"Minimum size of vdev mapping to condense");
|
||||
ZFS_MODULE_PARAM(zfs_condense, zfs_condense_, min_mapping_bytes, ULONG, ZMOD_RW,
|
||||
"Don't bother condensing if the mapping uses less than this amount of "
|
||||
"memory");
|
||||
|
||||
/* CSTYLED */
|
||||
module_param(zfs_condense_max_obsolete_bytes, ulong, 0644);
|
||||
MODULE_PARM_DESC(zfs_condense_max_obsolete_bytes,
|
||||
ZFS_MODULE_PARAM(zfs_condense, zfs_condense_, max_obsolete_bytes, ULONG, ZMOD_RW,
|
||||
"Minimum size obsolete spacemap to attempt condensing");
|
||||
|
||||
module_param(zfs_condense_indirect_commit_entry_delay_ms, int, 0644);
|
||||
MODULE_PARM_DESC(zfs_condense_indirect_commit_entry_delay_ms,
|
||||
"Delay while condensing vdev mapping");
|
||||
ZFS_MODULE_PARAM(zfs_condense, zfs_condense_, indirect_commit_entry_delay_ms, INT, ZMOD_RW,
|
||||
"Used by tests to ensure certain actions happen in the middle of a "
|
||||
"condense. A maximum value of 1 should be sufficient.");
|
||||
|
||||
module_param(zfs_reconstruct_indirect_combinations_max, int, 0644);
|
||||
MODULE_PARM_DESC(zfs_reconstruct_indirect_combinations_max,
|
||||
ZFS_MODULE_PARAM(zfs_reconstruct, zfs_reconstruct_, indirect_combinations_max, INT, ZMOD_RW,
|
||||
"Maximum number of combinations when reconstructing split segments");
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
||||
Reference in New Issue
Block a user