Skip to content

Commit 2962b53

Browse files
committed
Windows: Make the vfs.zfs.vdev.raidz_impl sysctl cross-platform
Signed-off-by: Jorgen Lundman <lundman@lundman.net>
1 parent 27cf88e commit 2962b53

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

module/os/windows/zfs/sysctl_os.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,24 @@ param_set_deadman_failmode(ZFS_MODULE_PARAM_ARGS)
730730
}
731731

732732

733+
int
734+
param_set_raidz_impl(ZFS_MODULE_PARAM_ARGS)
735+
{
736+
static char buf[LINUX_MAX_MODULE_PARAM_LEN];
737+
int rc;
738+
739+
*type = ZT_TYPE_STRING;
740+
741+
if (set == B_FALSE) {
742+
vdev_raidz_impl_get(buf, LINUX_MAX_MODULE_PARAM_LEN);
743+
*ptr = (void *)buf;
744+
*len = strlen(buf);
745+
return (0);
746+
}
747+
748+
rc = vdev_raidz_impl_set(buf);
749+
return (rc);
750+
}
733751
/* spacemap.c */
734752

735753
/* vdev.c */

module/zfs/vdev_raidz_math.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ win32_zfs_vdev_raidz_impl_set(ZFS_MODULE_PARAM_ARGS)
670670

671671
if (set == B_FALSE) {
672672
if (raidz_math_initialized)
673-
zfs_vdev_raidz_impl_get(str, NULL);
673+
vdev_raidz_impl_get(str, PAGE_SIZE);
674674
*ptr = str;
675675
*len = strlen(str);
676676
return (0);

0 commit comments

Comments
 (0)