From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 29 20:42:11 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6981E106564A for ; Fri, 29 Apr 2011 20:42:11 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 23A798FC18 for ; Fri, 29 Apr 2011 20:42:10 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAEEiu02DaFvO/2dsb2JhbACEUKI4pi6NApEEgSmDVIEBBI5ohniHPg X-IronPort-AV: E=Sophos;i="4.64,289,1301889600"; d="scan'208";a="119124297" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 29 Apr 2011 16:42:10 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 6E0A9793A7 for ; Fri, 29 Apr 2011 16:42:10 -0400 (EDT) Date: Fri, 29 Apr 2011 16:42:10 -0400 (EDT) From: Rick Macklem To: freebsd-hackers Message-ID: <384344635.793652.1304109730387.JavaMail.root@erie.cs.uoguelph.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.203] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Subject: should I use a SYSCTL_STRUCT? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Apr 2011 20:42:11 -0000 Hi, I am at the point where I need to fix the "-z" option of nfsstat. Currently the stats are acquired/zeroed for the old NFS subsystem via sysctl. The setup in the kernel is: SYSCTL_STRUCT(_vfs_nfs, NFS_NFSSTATS, nfsstats, CTLFLAG_RW, &nfsstats, nfsstats, "S,nfsstats"); The new NFS subsystem currently gets the contents of the structure via a flag on nfssvc(2). So, I could either: - add another flag for nfssvc(2) to zero the structure OR - switch the new NFS subsystem over to using a SYSCTL_STRUCT() like the above. Which do you think would be preferable? Thanks in advance for any info, rick ps: I got completely lost on the SYSCTL thread in Jan. and would rather not start another one like it:-)