diff options
author | Jeff Layton <jlayton@redhat.com> | 2013-03-27 10:15:38 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-04-03 11:47:24 -0400 |
commit | a2f999a37ebb77e857d3a178bd6f52d1163cd980 (patch) | |
tree | 2319536cbbc8edba7af77de9f1358edea3a289cc /fs/nfsd/nfsctl.c | |
parent | 6c6910cd4d0cdb905fbba8c751afd143696930f2 (diff) |
nfsd: add new reply_cache_stats file in nfsdfs
For presenting statistics relating to duplicate reply cache.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfsctl.c')
-rw-r--r-- | fs/nfsd/nfsctl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index f33455b4d957..a830f33df3ef 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c | |||
@@ -35,6 +35,7 @@ enum { | |||
35 | NFSD_Threads, | 35 | NFSD_Threads, |
36 | NFSD_Pool_Threads, | 36 | NFSD_Pool_Threads, |
37 | NFSD_Pool_Stats, | 37 | NFSD_Pool_Stats, |
38 | NFSD_Reply_Cache_Stats, | ||
38 | NFSD_Versions, | 39 | NFSD_Versions, |
39 | NFSD_Ports, | 40 | NFSD_Ports, |
40 | NFSD_MaxBlkSize, | 41 | NFSD_MaxBlkSize, |
@@ -212,6 +213,13 @@ static const struct file_operations pool_stats_operations = { | |||
212 | .owner = THIS_MODULE, | 213 | .owner = THIS_MODULE, |
213 | }; | 214 | }; |
214 | 215 | ||
216 | static struct file_operations reply_cache_stats_operations = { | ||
217 | .open = nfsd_reply_cache_stats_open, | ||
218 | .read = seq_read, | ||
219 | .llseek = seq_lseek, | ||
220 | .release = single_release, | ||
221 | }; | ||
222 | |||
215 | /*----------------------------------------------------------------------------*/ | 223 | /*----------------------------------------------------------------------------*/ |
216 | /* | 224 | /* |
217 | * payload - write methods | 225 | * payload - write methods |
@@ -1047,6 +1055,7 @@ static int nfsd_fill_super(struct super_block * sb, void * data, int silent) | |||
1047 | [NFSD_Threads] = {"threads", &transaction_ops, S_IWUSR|S_IRUSR}, | 1055 | [NFSD_Threads] = {"threads", &transaction_ops, S_IWUSR|S_IRUSR}, |
1048 | [NFSD_Pool_Threads] = {"pool_threads", &transaction_ops, S_IWUSR|S_IRUSR}, | 1056 | [NFSD_Pool_Threads] = {"pool_threads", &transaction_ops, S_IWUSR|S_IRUSR}, |
1049 | [NFSD_Pool_Stats] = {"pool_stats", &pool_stats_operations, S_IRUGO}, | 1057 | [NFSD_Pool_Stats] = {"pool_stats", &pool_stats_operations, S_IRUGO}, |
1058 | [NFSD_Reply_Cache_Stats] = {"reply_cache_stats", &reply_cache_stats_operations, S_IRUGO}, | ||
1050 | [NFSD_Versions] = {"versions", &transaction_ops, S_IWUSR|S_IRUSR}, | 1059 | [NFSD_Versions] = {"versions", &transaction_ops, S_IWUSR|S_IRUSR}, |
1051 | [NFSD_Ports] = {"portlist", &transaction_ops, S_IWUSR|S_IRUGO}, | 1060 | [NFSD_Ports] = {"portlist", &transaction_ops, S_IWUSR|S_IRUGO}, |
1052 | [NFSD_MaxBlkSize] = {"max_block_size", &transaction_ops, S_IWUSR|S_IRUGO}, | 1061 | [NFSD_MaxBlkSize] = {"max_block_size", &transaction_ops, S_IWUSR|S_IRUGO}, |