Author: smh
Date: Wed Jul 6 23:49:19 2016
New Revision: 302382
URL: https://svnweb.freebsd.org/changeset/base/302382
Log:
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
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jul 6
22:21:22 2016 (r302381)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Wed Jul 6
23:49:19 2016 (r302382)
@@ -919,6 +919,12 @@ sysctl_vfs_zfs_arc_max(SYSCTL_HANDLER_AR
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_AR
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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"