New kstats for NFS server and xdrmblk_getpos fix

Review Request #60 — Created June 16, 2015 and submitted — Latest diff uploaded

5907, 6090


This is implementation of the detailed IOPS, bandwidth, and latency kstats for NFS server. The kstats are two level: one "global" for the NFS server and broken down per share.

Together with the kstats implementation there is a fix in the xdrmblk implementation which is a prerequisite for the kstat work.

I ran the debug bits on the NFS server for several hours with various tests to
make sure everything works as exepcted. I checked all of the kstats (for all
NFS and NFS_ACL protocol versions) are properly updated. I also make sure that
the re-share works as expected and the kstats are properly persisted.

As a sanity check I also ran the debug bits on NFS cleint just to make sure
there is no regression.

After every test run I generated the crash dump file and checked it for leaks
using the ::findleaks mdb command. This testing helped me during the
development to realize that the xdrmblk users usually does not call the
XDR_DESTROY() for the used XDR stream. I checkeck (and fixed) all of the
xdrmblk users to make sure the XDR stream is properly destroyed/freed.

Using the ::findleaks mdb command I confirmed that there are no new memory
leaks introduced by the change.