mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
Make the vfs.zfs.vdev.raidz_impl sysctl cross-platform
Reviewed-by: Allan Jude <allan@klarasystems.com> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Alan Somers <asomers@gmail.com> Sponsored by: ConnectWise Closes #16980
This commit is contained in:
@@ -679,6 +679,27 @@ param_set_deadman_failmode(SYSCTL_HANDLER_ARGS)
|
||||
return (-param_set_deadman_failmode_common(buf));
|
||||
}
|
||||
|
||||
int
|
||||
param_set_raidz_impl(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
const size_t bufsize = 128;
|
||||
char *buf;
|
||||
int rc;
|
||||
|
||||
buf = malloc(bufsize, M_SOLARIS, M_WAITOK | M_ZERO);
|
||||
if (req->newptr == NULL)
|
||||
vdev_raidz_impl_get(buf, bufsize);
|
||||
|
||||
rc = sysctl_handle_string(oidp, buf, bufsize, req);
|
||||
if (rc || req->newptr == NULL) {
|
||||
free(buf, M_SOLARIS);
|
||||
return (rc);
|
||||
}
|
||||
rc = vdev_raidz_impl_set(buf);
|
||||
free(buf, M_SOLARIS);
|
||||
return (rc);
|
||||
}
|
||||
|
||||
int
|
||||
param_set_slop_shift(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user