Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Apr 2011 16:42:10 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   should I use a SYSCTL_STRUCT?
Message-ID:  <384344635.793652.1304109730387.JavaMail.root@erie.cs.uoguelph.ca>

next in thread | raw e-mail | index | archive | help
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:-)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?384344635.793652.1304109730387.JavaMail.root>