Refactor openzfs_sysctl_init() and ZfsArcMeter...

openzfs_sysctl_init() now returns void instead of int.
The ZfsArcStats->enabled flag is set inside the init function
now, instead of having to be set from its return value.
Preparation for more flag setting in Compressed ARC commit.

ZfsArcMeter_readStats() added and all Meter->values[] setting
moved to it, eliminating duplicated code in
{darwin,freebsd,linux,solaris}/Platform.c.
This commit is contained in:
Ross Williams
2019-09-03 18:21:33 +00:00
parent ff6914e4ad
commit e450b58636
10 changed files with 34 additions and 56 deletions

View File

@ -118,7 +118,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, ui
len = 2; sysctlnametomib("vfs.bufspace", MIB_vfs_bufspace, &len);
fpl->zfs.enabled = openzfs_sysctl_init();
openzfs_sysctl_init(&fpl->zfs);
openzfs_sysctl_updateArcStats(&fpl->zfs);
int smp = 0;