diff options
author | Shankar Anand <shanand@novell.com> | 2006-07-10 07:45:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-10 16:24:27 -0400 |
commit | e2b209509ca33743864846aef2e1b2afc21f7915 (patch) | |
tree | 19e7ed73049af78d6c605b326cc433034a2cd50c /fs/nfsd/nfs4proc.c | |
parent | cd6b3956e9923915da789df1c665976b5583cfb0 (diff) |
[PATCH] knfsd: nfsd4: add per-operation server stats
Add an nfs4 operations count array to nfsd_stats structure. The count is
incremented in nfsd4_proc_compound() where all the operations are handled
by the nfsv4 server. This count of individual nfsv4 operations is also
entered into /proc filesystem.
Signed-off-by: Shankar Anand<shanand@novell.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index b0e095ea0c03..ee4eff27aedc 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -721,6 +721,12 @@ nfsd4_proc_null(struct svc_rqst *rqstp, void *argp, void *resp) | |||
721 | return nfs_ok; | 721 | return nfs_ok; |
722 | } | 722 | } |
723 | 723 | ||
724 | static inline void nfsd4_increment_op_stats(u32 opnum) | ||
725 | { | ||
726 | if (opnum >= FIRST_NFS4_OP && opnum <= LAST_NFS4_OP) | ||
727 | nfsdstats.nfs4_opcount[opnum]++; | ||
728 | } | ||
729 | |||
724 | 730 | ||
725 | /* | 731 | /* |
726 | * COMPOUND call. | 732 | * COMPOUND call. |
@@ -930,6 +936,8 @@ encode_op: | |||
930 | /* XXX Ugh, we need to get rid of this kind of special case: */ | 936 | /* XXX Ugh, we need to get rid of this kind of special case: */ |
931 | if (op->opnum == OP_READ && op->u.read.rd_filp) | 937 | if (op->opnum == OP_READ && op->u.read.rd_filp) |
932 | fput(op->u.read.rd_filp); | 938 | fput(op->u.read.rd_filp); |
939 | |||
940 | nfsd4_increment_op_stats(op->opnum); | ||
933 | } | 941 | } |
934 | 942 | ||
935 | out: | 943 | out: |