Fix ZFS ARC min / max tunable
Due to ARC initial configuration not being done and kmem information not being available we need to blindly set zfs_arc_max and zfs_arc_min when configured via the tunable. This fixes vfs.zfs.arc_(min|max) configuration via loader.conf broken by r302265. Approved by: re(gjb) MFC after: 1 week
This commit is contained in:
parent
fe840b6ea6
commit
f10b37d27b
@ -919,6 +919,12 @@ sysctl_vfs_zfs_arc_max(SYSCTL_HANDLER_ARGS)
|
||||
if (err != 0 || req->newptr == NULL)
|
||||
return (err);
|
||||
|
||||
if (zfs_arc_max == 0) {
|
||||
/* Loader tunable so blindly set */
|
||||
zfs_arc_max = val;
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (val < arc_abs_min || val > kmem_size())
|
||||
return (EINVAL);
|
||||
if (val < arc_c_min)
|
||||
@ -956,6 +962,12 @@ sysctl_vfs_zfs_arc_min(SYSCTL_HANDLER_ARGS)
|
||||
if (err != 0 || req->newptr == NULL)
|
||||
return (err);
|
||||
|
||||
if (zfs_arc_min == 0) {
|
||||
/* Loader tunable so blindly set */
|
||||
zfs_arc_min = val;
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (val < arc_abs_min || val > arc_c_max)
|
||||
return (EINVAL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user