aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev_mirror.c
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-09-05 14:49:49 -0700
committerBrian Behlendorf <[email protected]>2019-09-05 14:49:49 -0700
commit03fdcb9adc596fb86a65edb56d8088b77ea2d891 (patch)
treec68cec08565296ad37d53677fdfbc4d5c6e7ef7d /module/zfs/vdev_mirror.c
parent65a91b166e66a57c44b62bb5ca20ccb6f0ecc46d (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_mirror.c')
-rw-r--r--module/zfs/vdev_mirror.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/module/zfs/vdev_mirror.c b/module/zfs/vdev_mirror.c
index 2f75fca82..552b83e00 100644
--- a/module/zfs/vdev_mirror.c
+++ b/module/zfs/vdev_mirror.c
@@ -833,28 +833,20 @@ vdev_ops_t vdev_spare_ops = {
.vdev_op_leaf = B_FALSE /* not a leaf vdev */
};
-#if defined(_KERNEL)
/* BEGIN CSTYLED */
-module_param(zfs_vdev_mirror_rotating_inc, int, 0644);
-MODULE_PARM_DESC(zfs_vdev_mirror_rotating_inc,
+ZFS_MODULE_PARAM(zfs_vdev_mirror, zfs_vdev_mirror_, rotating_inc, INT, ZMOD_RW,
"Rotating media load increment for non-seeking I/O's");
-module_param(zfs_vdev_mirror_rotating_seek_inc, int, 0644);
-MODULE_PARM_DESC(zfs_vdev_mirror_rotating_seek_inc,
+ZFS_MODULE_PARAM(zfs_vdev_mirror, zfs_vdev_mirror_, rotating_seek_inc, INT, ZMOD_RW,
"Rotating media load increment for seeking I/O's");
-module_param(zfs_vdev_mirror_rotating_seek_offset, int, 0644);
+ZFS_MODULE_PARAM(zfs_vdev_mirror, zfs_vdev_mirror_, rotating_seek_offset, INT, ZMOD_RW,
+ "Offset in bytes from the last I/O which triggers "
+ "a reduced rotating media seek increment");
-MODULE_PARM_DESC(zfs_vdev_mirror_rotating_seek_offset,
- "Offset in bytes from the last I/O which "
- "triggers a reduced rotating media seek increment");
-
-module_param(zfs_vdev_mirror_non_rotating_inc, int, 0644);
-MODULE_PARM_DESC(zfs_vdev_mirror_non_rotating_inc,
+ZFS_MODULE_PARAM(zfs_vdev_mirror, zfs_vdev_mirror_, non_rotating_inc, INT, ZMOD_RW,
"Non-rotating media load increment for non-seeking I/O's");
-module_param(zfs_vdev_mirror_non_rotating_seek_inc, int, 0644);
-MODULE_PARM_DESC(zfs_vdev_mirror_non_rotating_seek_inc,
+ZFS_MODULE_PARAM(zfs_vdev_mirror, zfs_vdev_mirror_, non_rotating_seek_inc, INT, ZMOD_RW,
"Non-rotating media load increment for seeking I/O's");
/* END CSTYLED */
-#endif