svn commit: r321356 - head/usr.bin/top
Mark Johnston
markj at FreeBSD.org
Fri Jul 21 23:53:49 UTC 2017
Author: markj
Date: Fri Jul 21 23:53:48 2017
New Revision: 321356
URL: https://svnweb.freebsd.org/changeset/base/321356
Log:
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
Modified:
head/usr.bin/top/machine.c
Modified: head/usr.bin/top/machine.c
==============================================================================
--- head/usr.bin/top/machine.c Fri Jul 21 23:08:13 2017 (r321355)
+++ head/usr.bin/top/machine.c Fri Jul 21 23:53:48 2017 (r321356)
@@ -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) {
More information about the svn-src-all
mailing list