nfsd: move most of nfsfh.h to fs/nfsd
[safe/jmp/linux-2.6] / fs / nfsd / stats.c
index 1cf955b..3fc69df 100644 (file)
  * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de>
  */
 
-#include <linux/kernel.h>
-#include <linux/time.h>
-#include <linux/proc_fs.h>
 #include <linux/seq_file.h>
-#include <linux/stat.h>
 #include <linux/module.h>
-
-#include <linux/sunrpc/svc.h>
 #include <linux/sunrpc/stats.h>
-#include <linux/nfsd/nfsd.h>
 #include <linux/nfsd/stats.h>
 
+#include "nfsd.h"
+
 struct nfsd_stats      nfsdstats;
 struct svc_stat                nfsd_svcstats = {
        .program        = &nfsd_program,
@@ -72,6 +67,16 @@ static int nfsd_proc_show(struct seq_file *seq, void *v)
        /* show my rpc info */
        svc_seq_show(seq, &nfsd_svcstats);
 
+#ifdef CONFIG_NFSD_V4
+       /* Show count for individual nfsv4 operations */
+       /* Writing operation numbers 0 1 2 also for maintaining uniformity */
+       seq_printf(seq,"proc4ops %u", LAST_NFS4_OP + 1);
+       for (i = 0; i <= LAST_NFS4_OP; i++)
+               seq_printf(seq, " %u", nfsdstats.nfs4_opcount[i]);
+
+       seq_putc(seq, '\n');
+#endif
+
        return 0;
 }
 
@@ -80,7 +85,7 @@ static int nfsd_proc_open(struct inode *inode, struct file *file)
        return single_open(file, nfsd_proc_show, NULL);
 }
 
-static struct file_operations nfsd_proc_fops = {
+static const struct file_operations nfsd_proc_fops = {
        .owner = THIS_MODULE,
        .open = nfsd_proc_open,
        .read  = seq_read,