Date: Fri, 21 Jul 2017 23:53:48 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321356 - head/usr.bin/top Message-ID: <201707212353.v6LNrmYA092257@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707212353.v6LNrmYA092257>