diff options
author | Jan Harkes <jaharkes@cs.cmu.edu> | 2007-07-19 04:48:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 13:04:48 -0400 |
commit | 3cf01f28c303be34f18cb4f6204cf1bdfe12ba7c (patch) | |
tree | 140dae900c998f568ddac7bf74e390fda4d5e8ce /fs/coda | |
parent | a1b0aa87647493c0201821ab884e86298d5da7d6 (diff) |
coda: remove statistics counters from /proc/fs/coda
Similar information can easily be obtained with strace -c.
Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/coda')
-rw-r--r-- | fs/coda/coda_int.h | 7 | ||||
-rw-r--r-- | fs/coda/dir.c | 16 | ||||
-rw-r--r-- | fs/coda/file.c | 10 | ||||
-rw-r--r-- | fs/coda/psdev.c | 1 | ||||
-rw-r--r-- | fs/coda/symlink.c | 2 | ||||
-rw-r--r-- | fs/coda/sysctl.c | 228 | ||||
-rw-r--r-- | fs/coda/upcall.c | 3 |
7 files changed, 15 insertions, 252 deletions
diff --git a/fs/coda/coda_int.h b/fs/coda/coda_int.h index 9e6338fea514..8ccd5ed81d9c 100644 --- a/fs/coda/coda_int.h +++ b/fs/coda/coda_int.h | |||
@@ -1,12 +1,19 @@ | |||
1 | #ifndef _CODA_INT_ | 1 | #ifndef _CODA_INT_ |
2 | #define _CODA_INT_ | 2 | #define _CODA_INT_ |
3 | 3 | ||
4 | struct dentry; | ||
5 | |||
4 | extern struct file_system_type coda_fs_type; | 6 | extern struct file_system_type coda_fs_type; |
7 | extern unsigned long coda_timeout; | ||
8 | extern int coda_hard; | ||
9 | extern int coda_fake_statfs; | ||
5 | 10 | ||
6 | void coda_destroy_inodecache(void); | 11 | void coda_destroy_inodecache(void); |
7 | int coda_init_inodecache(void); | 12 | int coda_init_inodecache(void); |
8 | int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, | 13 | int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, |
9 | int datasync); | 14 | int datasync); |
15 | void coda_sysctl_init(void); | ||
16 | void coda_sysctl_clean(void); | ||
10 | 17 | ||
11 | #endif /* _CODA_INT_ */ | 18 | #endif /* _CODA_INT_ */ |
12 | 19 | ||
diff --git a/fs/coda/dir.c b/fs/coda/dir.c index 0c6c48ca7496..04a3dd84c993 100644 --- a/fs/coda/dir.c +++ b/fs/coda/dir.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/coda_psdev.h> | 25 | #include <linux/coda_psdev.h> |
26 | #include <linux/coda_fs_i.h> | 26 | #include <linux/coda_fs_i.h> |
27 | #include <linux/coda_cache.h> | 27 | #include <linux/coda_cache.h> |
28 | #include <linux/coda_proc.h> | ||
29 | 28 | ||
30 | #include "coda_int.h" | 29 | #include "coda_int.h" |
31 | 30 | ||
@@ -148,8 +147,6 @@ int coda_permission(struct inode *inode, int mask, struct nameidata *nd) | |||
148 | 147 | ||
149 | lock_kernel(); | 148 | lock_kernel(); |
150 | 149 | ||
151 | coda_vfs_stat.permission++; | ||
152 | |||
153 | if (coda_cache_check(inode, mask)) | 150 | if (coda_cache_check(inode, mask)) |
154 | goto out; | 151 | goto out; |
155 | 152 | ||
@@ -206,7 +203,6 @@ static int coda_create(struct inode *dir, struct dentry *de, int mode, struct na | |||
206 | struct coda_vattr attrs; | 203 | struct coda_vattr attrs; |
207 | 204 | ||
208 | lock_kernel(); | 205 | lock_kernel(); |
209 | coda_vfs_stat.create++; | ||
210 | 206 | ||
211 | if (coda_isroot(dir) && coda_iscontrol(name, length)) { | 207 | if (coda_isroot(dir) && coda_iscontrol(name, length)) { |
212 | unlock_kernel(); | 208 | unlock_kernel(); |
@@ -246,7 +242,6 @@ static int coda_mkdir(struct inode *dir, struct dentry *de, int mode) | |||
246 | struct CodaFid newfid; | 242 | struct CodaFid newfid; |
247 | 243 | ||
248 | lock_kernel(); | 244 | lock_kernel(); |
249 | coda_vfs_stat.mkdir++; | ||
250 | 245 | ||
251 | if (coda_isroot(dir) && coda_iscontrol(name, len)) { | 246 | if (coda_isroot(dir) && coda_iscontrol(name, len)) { |
252 | unlock_kernel(); | 247 | unlock_kernel(); |
@@ -288,7 +283,6 @@ static int coda_link(struct dentry *source_de, struct inode *dir_inode, | |||
288 | int error; | 283 | int error; |
289 | 284 | ||
290 | lock_kernel(); | 285 | lock_kernel(); |
291 | coda_vfs_stat.link++; | ||
292 | 286 | ||
293 | if (coda_isroot(dir_inode) && coda_iscontrol(name, len)) { | 287 | if (coda_isroot(dir_inode) && coda_iscontrol(name, len)) { |
294 | unlock_kernel(); | 288 | unlock_kernel(); |
@@ -320,10 +314,9 @@ static int coda_symlink(struct inode *dir_inode, struct dentry *de, | |||
320 | const char *name = de->d_name.name; | 314 | const char *name = de->d_name.name; |
321 | int len = de->d_name.len; | 315 | int len = de->d_name.len; |
322 | int symlen; | 316 | int symlen; |
323 | int error=0; | 317 | int error = 0; |
324 | 318 | ||
325 | lock_kernel(); | 319 | lock_kernel(); |
326 | coda_vfs_stat.symlink++; | ||
327 | 320 | ||
328 | if (coda_isroot(dir_inode) && coda_iscontrol(name, len)) { | 321 | if (coda_isroot(dir_inode) && coda_iscontrol(name, len)) { |
329 | unlock_kernel(); | 322 | unlock_kernel(); |
@@ -360,7 +353,6 @@ int coda_unlink(struct inode *dir, struct dentry *de) | |||
360 | int len = de->d_name.len; | 353 | int len = de->d_name.len; |
361 | 354 | ||
362 | lock_kernel(); | 355 | lock_kernel(); |
363 | coda_vfs_stat.unlink++; | ||
364 | 356 | ||
365 | error = venus_remove(dir->i_sb, coda_i2f(dir), name, len); | 357 | error = venus_remove(dir->i_sb, coda_i2f(dir), name, len); |
366 | if ( error ) { | 358 | if ( error ) { |
@@ -381,7 +373,6 @@ int coda_rmdir(struct inode *dir, struct dentry *de) | |||
381 | int error; | 373 | int error; |
382 | 374 | ||
383 | lock_kernel(); | 375 | lock_kernel(); |
384 | coda_vfs_stat.rmdir++; | ||
385 | 376 | ||
386 | error = venus_rmdir(dir->i_sb, coda_i2f(dir), name, len); | 377 | error = venus_rmdir(dir->i_sb, coda_i2f(dir), name, len); |
387 | if (!error) { | 378 | if (!error) { |
@@ -408,7 +399,6 @@ static int coda_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
408 | int error; | 399 | int error; |
409 | 400 | ||
410 | lock_kernel(); | 401 | lock_kernel(); |
411 | coda_vfs_stat.rename++; | ||
412 | 402 | ||
413 | error = venus_rename(old_dir->i_sb, coda_i2f(old_dir), | 403 | error = venus_rename(old_dir->i_sb, coda_i2f(old_dir), |
414 | coda_i2f(new_dir), old_length, new_length, | 404 | coda_i2f(new_dir), old_length, new_length, |
@@ -445,8 +435,6 @@ int coda_readdir(struct file *coda_file, void *buf, filldir_t filldir) | |||
445 | BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); | 435 | BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); |
446 | host_file = cfi->cfi_container; | 436 | host_file = cfi->cfi_container; |
447 | 437 | ||
448 | coda_vfs_stat.readdir++; | ||
449 | |||
450 | if (!host_file->f_op) | 438 | if (!host_file->f_op) |
451 | return -ENOTDIR; | 439 | return -ENOTDIR; |
452 | 440 | ||
diff --git a/fs/coda/file.c b/fs/coda/file.c index e7d622709c90..7594962604c2 100644 --- a/fs/coda/file.c +++ b/fs/coda/file.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/coda_linux.h> | 22 | #include <linux/coda_linux.h> |
23 | #include <linux/coda_fs_i.h> | 23 | #include <linux/coda_fs_i.h> |
24 | #include <linux/coda_psdev.h> | 24 | #include <linux/coda_psdev.h> |
25 | #include <linux/coda_proc.h> | ||
26 | 25 | ||
27 | #include "coda_int.h" | 26 | #include "coda_int.h" |
28 | 27 | ||
@@ -134,8 +133,6 @@ int coda_open(struct inode *coda_inode, struct file *coda_file) | |||
134 | unsigned short coda_flags = coda_flags_to_cflags(flags); | 133 | unsigned short coda_flags = coda_flags_to_cflags(flags); |
135 | struct coda_file_info *cfi; | 134 | struct coda_file_info *cfi; |
136 | 135 | ||
137 | coda_vfs_stat.open++; | ||
138 | |||
139 | cfi = kmalloc(sizeof(struct coda_file_info), GFP_KERNEL); | 136 | cfi = kmalloc(sizeof(struct coda_file_info), GFP_KERNEL); |
140 | if (!cfi) | 137 | if (!cfi) |
141 | return -ENOMEM; | 138 | return -ENOMEM; |
@@ -176,8 +173,6 @@ int coda_flush(struct file *coda_file, fl_owner_t id) | |||
176 | 173 | ||
177 | lock_kernel(); | 174 | lock_kernel(); |
178 | 175 | ||
179 | coda_vfs_stat.flush++; | ||
180 | |||
181 | /* last close semantics */ | 176 | /* last close semantics */ |
182 | fcnt = file_count(coda_file); | 177 | fcnt = file_count(coda_file); |
183 | if (fcnt > 1) | 178 | if (fcnt > 1) |
@@ -219,8 +214,7 @@ int coda_release(struct inode *coda_inode, struct file *coda_file) | |||
219 | int err = 0; | 214 | int err = 0; |
220 | 215 | ||
221 | lock_kernel(); | 216 | lock_kernel(); |
222 | coda_vfs_stat.release++; | 217 | |
223 | |||
224 | if (!use_coda_close) { | 218 | if (!use_coda_close) { |
225 | err = venus_release(coda_inode->i_sb, coda_i2f(coda_inode), | 219 | err = venus_release(coda_inode->i_sb, coda_i2f(coda_inode), |
226 | coda_flags); | 220 | coda_flags); |
@@ -271,8 +265,6 @@ int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync) | |||
271 | BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); | 265 | BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); |
272 | host_file = cfi->cfi_container; | 266 | host_file = cfi->cfi_container; |
273 | 267 | ||
274 | coda_vfs_stat.fsync++; | ||
275 | |||
276 | if (host_file->f_op && host_file->f_op->fsync) { | 268 | if (host_file->f_op && host_file->f_op->fsync) { |
277 | host_dentry = host_file->f_path.dentry; | 269 | host_dentry = host_file->f_path.dentry; |
278 | host_inode = host_dentry->d_inode; | 270 | host_inode = host_dentry->d_inode; |
diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c index 8a09f19596db..e3a0a4164d5d 100644 --- a/fs/coda/psdev.c +++ b/fs/coda/psdev.c | |||
@@ -45,7 +45,6 @@ | |||
45 | #include <linux/coda_linux.h> | 45 | #include <linux/coda_linux.h> |
46 | #include <linux/coda_fs_i.h> | 46 | #include <linux/coda_fs_i.h> |
47 | #include <linux/coda_psdev.h> | 47 | #include <linux/coda_psdev.h> |
48 | #include <linux/coda_proc.h> | ||
49 | 48 | ||
50 | #include "coda_int.h" | 49 | #include "coda_int.h" |
51 | 50 | ||
diff --git a/fs/coda/symlink.c b/fs/coda/symlink.c index 76e00a65a75b..4513b7258458 100644 --- a/fs/coda/symlink.c +++ b/fs/coda/symlink.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/coda_linux.h> | 20 | #include <linux/coda_linux.h> |
21 | #include <linux/coda_psdev.h> | 21 | #include <linux/coda_psdev.h> |
22 | #include <linux/coda_fs_i.h> | 22 | #include <linux/coda_fs_i.h> |
23 | #include <linux/coda_proc.h> | ||
24 | 23 | ||
25 | static int coda_symlink_filler(struct file *file, struct page *page) | 24 | static int coda_symlink_filler(struct file *file, struct page *page) |
26 | { | 25 | { |
@@ -32,7 +31,6 @@ static int coda_symlink_filler(struct file *file, struct page *page) | |||
32 | 31 | ||
33 | lock_kernel(); | 32 | lock_kernel(); |
34 | cii = ITOC(inode); | 33 | cii = ITOC(inode); |
35 | coda_vfs_stat.follow_link++; | ||
36 | 34 | ||
37 | error = venus_readlink(inode->i_sb, &cii->c_fid, p, &len); | 35 | error = venus_readlink(inode->i_sb, &cii->c_fid, p, &len); |
38 | unlock_kernel(); | 36 | unlock_kernel(); |
diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c index c57a1fa7cf23..81b7771c6465 100644 --- a/fs/coda/sysctl.c +++ b/fs/coda/sysctl.c | |||
@@ -5,181 +5,14 @@ | |||
5 | * | 5 | * |
6 | * Carnegie Mellon encourages users to contribute improvements to | 6 | * Carnegie Mellon encourages users to contribute improvements to |
7 | * the Coda project. Contact Peter Braam (coda@cs.cmu.edu). | 7 | * the Coda project. Contact Peter Braam (coda@cs.cmu.edu). |
8 | * | ||
9 | * CODA operation statistics | ||
10 | * (c) March, 1998 Zhanyong Wan <zhanyong.wan@yale.edu> | ||
11 | * | ||
12 | */ | 8 | */ |
13 | 9 | ||
14 | #include <linux/time.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/sysctl.h> | 10 | #include <linux/sysctl.h> |
17 | #include <linux/proc_fs.h> | ||
18 | #include <linux/seq_file.h> | ||
19 | #include <linux/slab.h> | ||
20 | #include <linux/stat.h> | ||
21 | #include <linux/ctype.h> | ||
22 | #include <linux/bitops.h> | ||
23 | #include <asm/uaccess.h> | ||
24 | #include <linux/utsname.h> | ||
25 | #include <linux/module.h> | ||
26 | 11 | ||
27 | #include <linux/coda.h> | 12 | #include "coda_int.h" |
28 | #include <linux/coda_linux.h> | ||
29 | #include <linux/coda_fs_i.h> | ||
30 | #include <linux/coda_psdev.h> | ||
31 | #include <linux/coda_cache.h> | ||
32 | #include <linux/coda_proc.h> | ||
33 | 13 | ||
34 | static struct ctl_table_header *fs_table_header; | 14 | static struct ctl_table_header *fs_table_header; |
35 | 15 | ||
36 | #define CODA_TIMEOUT 3 /* timeout on upcalls to become intrble */ | ||
37 | #define CODA_HARD 5 /* mount type "hard" or "soft" */ | ||
38 | #define CODA_VFS 6 /* vfs statistics */ | ||
39 | #define CODA_CACHE_INV 9 /* cache invalidation statistics */ | ||
40 | #define CODA_FAKE_STATFS 10 /* don't query venus for actual cache usage */ | ||
41 | |||
42 | struct coda_vfs_stats coda_vfs_stat; | ||
43 | static struct coda_cache_inv_stats coda_cache_inv_stat; | ||
44 | |||
45 | static void reset_coda_vfs_stats( void ) | ||
46 | { | ||
47 | memset( &coda_vfs_stat, 0, sizeof( coda_vfs_stat ) ); | ||
48 | } | ||
49 | |||
50 | static void reset_coda_cache_inv_stats( void ) | ||
51 | { | ||
52 | memset( &coda_cache_inv_stat, 0, sizeof( coda_cache_inv_stat ) ); | ||
53 | } | ||
54 | |||
55 | static int do_reset_coda_vfs_stats( ctl_table * table, int write, | ||
56 | struct file * filp, void __user * buffer, | ||
57 | size_t * lenp, loff_t * ppos ) | ||
58 | { | ||
59 | if ( write ) { | ||
60 | reset_coda_vfs_stats(); | ||
61 | |||
62 | *ppos += *lenp; | ||
63 | } else { | ||
64 | *lenp = 0; | ||
65 | } | ||
66 | |||
67 | return 0; | ||
68 | } | ||
69 | |||
70 | static int do_reset_coda_cache_inv_stats( ctl_table * table, int write, | ||
71 | struct file * filp, | ||
72 | void __user * buffer, | ||
73 | size_t * lenp, loff_t * ppos ) | ||
74 | { | ||
75 | if ( write ) { | ||
76 | reset_coda_cache_inv_stats(); | ||
77 | |||
78 | *ppos += *lenp; | ||
79 | } else { | ||
80 | *lenp = 0; | ||
81 | } | ||
82 | |||
83 | return 0; | ||
84 | } | ||
85 | |||
86 | static int proc_vfs_stats_show(struct seq_file *m, void *v) | ||
87 | { | ||
88 | struct coda_vfs_stats * ps = & coda_vfs_stat; | ||
89 | |||
90 | seq_printf(m, | ||
91 | "Coda VFS statistics\n" | ||
92 | "===================\n\n" | ||
93 | "File Operations:\n" | ||
94 | "\topen\t\t%9d\n" | ||
95 | "\tflush\t\t%9d\n" | ||
96 | "\trelease\t\t%9d\n" | ||
97 | "\tfsync\t\t%9d\n\n" | ||
98 | "Dir Operations:\n" | ||
99 | "\treaddir\t\t%9d\n\n" | ||
100 | "Inode Operations\n" | ||
101 | "\tcreate\t\t%9d\n" | ||
102 | "\tlookup\t\t%9d\n" | ||
103 | "\tlink\t\t%9d\n" | ||
104 | "\tunlink\t\t%9d\n" | ||
105 | "\tsymlink\t\t%9d\n" | ||
106 | "\tmkdir\t\t%9d\n" | ||
107 | "\trmdir\t\t%9d\n" | ||
108 | "\trename\t\t%9d\n" | ||
109 | "\tpermission\t%9d\n", | ||
110 | |||
111 | /* file operations */ | ||
112 | ps->open, | ||
113 | ps->flush, | ||
114 | ps->release, | ||
115 | ps->fsync, | ||
116 | |||
117 | /* dir operations */ | ||
118 | ps->readdir, | ||
119 | |||
120 | /* inode operations */ | ||
121 | ps->create, | ||
122 | ps->lookup, | ||
123 | ps->link, | ||
124 | ps->unlink, | ||
125 | ps->symlink, | ||
126 | ps->mkdir, | ||
127 | ps->rmdir, | ||
128 | ps->rename, | ||
129 | ps->permission); | ||
130 | return 0; | ||
131 | } | ||
132 | |||
133 | static int proc_cache_inv_stats_show(struct seq_file *m, void *v) | ||
134 | { | ||
135 | struct coda_cache_inv_stats * ps = & coda_cache_inv_stat; | ||
136 | |||
137 | seq_printf(m, | ||
138 | "Coda cache invalidation statistics\n" | ||
139 | "==================================\n\n" | ||
140 | "flush\t\t%9d\n" | ||
141 | "purge user\t%9d\n" | ||
142 | "zap_dir\t\t%9d\n" | ||
143 | "zap_file\t%9d\n" | ||
144 | "zap_vnode\t%9d\n" | ||
145 | "purge_fid\t%9d\n" | ||
146 | "replace\t\t%9d\n", | ||
147 | ps->flush, | ||
148 | ps->purge_user, | ||
149 | ps->zap_dir, | ||
150 | ps->zap_file, | ||
151 | ps->zap_vnode, | ||
152 | ps->purge_fid, | ||
153 | ps->replace ); | ||
154 | return 0; | ||
155 | } | ||
156 | |||
157 | static int proc_vfs_stats_open(struct inode *inode, struct file *file) | ||
158 | { | ||
159 | return single_open(file, proc_vfs_stats_show, NULL); | ||
160 | } | ||
161 | |||
162 | static int proc_cache_inv_stats_open(struct inode *inode, struct file *file) | ||
163 | { | ||
164 | return single_open(file, proc_cache_inv_stats_show, NULL); | ||
165 | } | ||
166 | |||
167 | static const struct file_operations proc_vfs_stats_fops = { | ||
168 | .owner = THIS_MODULE, | ||
169 | .open = proc_vfs_stats_open, | ||
170 | .read = seq_read, | ||
171 | .llseek = seq_lseek, | ||
172 | .release = single_release, | ||
173 | }; | ||
174 | |||
175 | static const struct file_operations proc_cache_inv_stats_fops = { | ||
176 | .owner = THIS_MODULE, | ||
177 | .open = proc_cache_inv_stats_open, | ||
178 | .read = seq_read, | ||
179 | .llseek = seq_lseek, | ||
180 | .release = single_release, | ||
181 | }; | ||
182 | |||
183 | static ctl_table coda_table[] = { | 16 | static ctl_table coda_table[] = { |
184 | { | 17 | { |
185 | .ctl_name = CTL_UNNUMBERED, | 18 | .ctl_name = CTL_UNNUMBERED, |
@@ -199,22 +32,6 @@ static ctl_table coda_table[] = { | |||
199 | }, | 32 | }, |
200 | { | 33 | { |
201 | .ctl_name = CTL_UNNUMBERED, | 34 | .ctl_name = CTL_UNNUMBERED, |
202 | .procname = "vfs_stats", | ||
203 | .data = NULL, | ||
204 | .maxlen = 0, | ||
205 | .mode = 0644, | ||
206 | .proc_handler = &do_reset_coda_vfs_stats | ||
207 | }, | ||
208 | { | ||
209 | .ctl_name = CTL_UNNUMBERED, | ||
210 | .procname = "cache_inv_stats", | ||
211 | .data = NULL, | ||
212 | .maxlen = 0, | ||
213 | .mode = 0644, | ||
214 | .proc_handler = &do_reset_coda_cache_inv_stats | ||
215 | }, | ||
216 | { | ||
217 | .ctl_name = CTL_UNNUMBERED, | ||
218 | .procname = "fake_statfs", | 35 | .procname = "fake_statfs", |
219 | .data = &coda_fake_statfs, | 36 | .data = &coda_fake_statfs, |
220 | .maxlen = sizeof(int), | 37 | .maxlen = sizeof(int), |
@@ -235,59 +52,20 @@ static ctl_table fs_table[] = { | |||
235 | }; | 52 | }; |
236 | 53 | ||
237 | 54 | ||
238 | #ifdef CONFIG_PROC_FS | ||
239 | |||
240 | /* | ||
241 | target directory structure: | ||
242 | /proc/fs (see linux/fs/proc/root.c) | ||
243 | /proc/fs/coda | ||
244 | /proc/fs/coda/{vfs_stats, | ||
245 | |||
246 | */ | ||
247 | |||
248 | static struct proc_dir_entry* proc_fs_coda; | ||
249 | |||
250 | #endif | ||
251 | |||
252 | void coda_sysctl_init(void) | 55 | void coda_sysctl_init(void) |
253 | { | 56 | { |
254 | reset_coda_vfs_stats(); | ||
255 | reset_coda_cache_inv_stats(); | ||
256 | |||
257 | #ifdef CONFIG_PROC_FS | ||
258 | proc_fs_coda = proc_mkdir("coda", proc_root_fs); | ||
259 | if (proc_fs_coda) { | ||
260 | struct proc_dir_entry *pde; | ||
261 | |||
262 | proc_fs_coda->owner = THIS_MODULE; | ||
263 | pde = create_proc_entry("vfs_stats", 0, proc_fs_coda); | ||
264 | if (pde) | ||
265 | pde->proc_fops = &proc_vfs_stats_fops; | ||
266 | pde = create_proc_entry("cache_inv_stats", 0, proc_fs_coda); | ||
267 | if (pde) | ||
268 | pde->proc_fops = &proc_cache_inv_stats_fops; | ||
269 | } | ||
270 | #endif | ||
271 | |||
272 | #ifdef CONFIG_SYSCTL | 57 | #ifdef CONFIG_SYSCTL |
273 | if ( !fs_table_header ) | 58 | if ( !fs_table_header ) |
274 | fs_table_header = register_sysctl_table(fs_table); | 59 | fs_table_header = register_sysctl_table(fs_table); |
275 | #endif | 60 | #endif |
276 | } | 61 | } |
277 | 62 | ||
278 | void coda_sysctl_clean(void) | 63 | void coda_sysctl_clean(void) |
279 | { | 64 | { |
280 | |||
281 | #ifdef CONFIG_SYSCTL | 65 | #ifdef CONFIG_SYSCTL |
282 | if ( fs_table_header ) { | 66 | if ( fs_table_header ) { |
283 | unregister_sysctl_table(fs_table_header); | 67 | unregister_sysctl_table(fs_table_header); |
284 | fs_table_header = NULL; | 68 | fs_table_header = NULL; |
285 | } | 69 | } |
286 | #endif | 70 | #endif |
287 | |||
288 | #ifdef CONFIG_PROC_FS | ||
289 | remove_proc_entry("cache_inv_stats", proc_fs_coda); | ||
290 | remove_proc_entry("vfs_stats", proc_fs_coda); | ||
291 | remove_proc_entry("coda", proc_root_fs); | ||
292 | #endif | ||
293 | } | 71 | } |
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c index 9a20a3b1998e..e4e766e5557c 100644 --- a/fs/coda/upcall.c +++ b/fs/coda/upcall.c | |||
@@ -35,7 +35,8 @@ | |||
35 | #include <linux/coda_psdev.h> | 35 | #include <linux/coda_psdev.h> |
36 | #include <linux/coda_fs_i.h> | 36 | #include <linux/coda_fs_i.h> |
37 | #include <linux/coda_cache.h> | 37 | #include <linux/coda_cache.h> |
38 | #include <linux/coda_proc.h> | 38 | |
39 | #include "coda_int.h" | ||
39 | 40 | ||
40 | static int coda_upcall(struct venus_comm *vc, int inSize, int *outSize, | 41 | static int coda_upcall(struct venus_comm *vc, int inSize, int *outSize, |
41 | union inputArgs *buffer); | 42 | union inputArgs *buffer); |