Fix top(1) output when zfs.ko is loaded but ZFS is not in use.
Reviewed by: allanjude MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D11693
This commit is contained in:
parent
5cf14660ae
commit
8781788d2b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=321356
@ -328,14 +328,15 @@ machine_init(struct statics *statics, char do_unames)
|
||||
size != sizeof(smpmode))
|
||||
smpmode = 0;
|
||||
|
||||
size = sizeof(carc_en);
|
||||
if (sysctlbyname("vfs.zfs.compressed_arc_enabled", &carc_en, &size,
|
||||
NULL, 0) == 0 && carc_en == 1)
|
||||
carc_enabled = 1;
|
||||
size = sizeof(arc_size);
|
||||
if (sysctlbyname("kstat.zfs.misc.arcstats.size", &arc_size, &size,
|
||||
NULL, 0) == 0 && arc_size != 0)
|
||||
arc_enabled = 1;
|
||||
size = sizeof(carc_en);
|
||||
if (arc_enabled &&
|
||||
sysctlbyname("vfs.zfs.compressed_arc_enabled", &carc_en, &size,
|
||||
NULL, 0) == 0 && carc_en == 1)
|
||||
carc_enabled = 1;
|
||||
|
||||
if (do_unames) {
|
||||
while ((pw = getpwent()) != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user