knfsd: add file to export stats about nfsd pools
authorGreg Banks <gnb@sgi.com>
Tue, 13 Jan 2009 10:26:36 +0000 (21:26 +1100)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Wed, 18 Mar 2009 21:38:42 +0000 (17:38 -0400)
commit03cf6c9f49a8fea953d38648d016e3f46e814991
treec7e639bd9fb775af1919d2442d0bf2306dfbfca7
parent59a252ff8c0f2fa32c896f69d56ae33e641ce7ad
knfsd: add file to export stats about nfsd pools

Add /proc/fs/nfsd/pool_stats to export to userspace various
statistics about the operation of rpc server thread pools.

This patch is based on a forward-ported version of
knfsd-add-pool-thread-stats which has been shipping in the SGI
"Enhanced NFS" product since 2006 and which was previously
posted:

http://article.gmane.org/gmane.linux.nfs/10375

It has also been updated thus:

 * moved EXPORT_SYMBOL() to near the function it exports
 * made the new struct struct seq_operations const
 * used SEQ_START_TOKEN instead of ((void *)1)
 * merged fix from SGI PV 990526 "sunrpc: use dprintk instead of
   printk in svc_pool_stats_*()" by Harshula Jayasuriya.
 * merged fix from SGI PV 964001 "Crash reading pool_stats before
   nfsds are started".

Signed-off-by: Greg Banks <gnb@sgi.com>
Signed-off-by: Harshula Jayasuriya <harshula@sgi.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/nfsd/nfsctl.c
fs/nfsd/nfssvc.c
include/linux/sunrpc/svc.h
net/sunrpc/svc_xprt.c