Skip to content

Commit 3cf01f2

Browse files
jaharkesLinus Torvalds
authored andcommitted
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>
1 parent a1b0aa8 commit 3cf01f2

10 files changed

Lines changed: 15 additions & 333 deletions

File tree

‎fs/coda/coda_int.h‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
#ifndef _CODA_INT_
22
#define _CODA_INT_
33

4+
struct dentry;
5+
46
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;
510

611
void coda_destroy_inodecache(void);
712
int coda_init_inodecache(void);
813
int coda_fsync(struct file *coda_file, struct dentry *coda_dentry,
914
int datasync);
15+
void coda_sysctl_init(void);
16+
void coda_sysctl_clean(void);
1017

1118
#endif /* _CODA_INT_ */
1219

‎fs/coda/dir.c‎

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <linux/coda_psdev.h>
2626
#include <linux/coda_fs_i.h>
2727
#include <linux/coda_cache.h>
28-
#include <linux/coda_proc.h>
2928

3029
#include "coda_int.h"
3130

@@ -148,8 +147,6 @@ int coda_permission(struct inode *inode, int mask, struct nameidata *nd)
148147

149148
lock_kernel();
150149

151-
coda_vfs_stat.permission++;
152-
153150
if (coda_cache_check(inode, mask))
154151
goto out;
155152

@@ -206,7 +203,6 @@ static int coda_create(struct inode *dir, struct dentry *de, int mode, struct na
206203
struct coda_vattr attrs;
207204

208205
lock_kernel();
209-
coda_vfs_stat.create++;
210206

211207
if (coda_isroot(dir) && coda_iscontrol(name, length)) {
212208
unlock_kernel();
@@ -246,7 +242,6 @@ static int coda_mkdir(struct inode *dir, struct dentry *de, int mode)
246242
struct CodaFid newfid;
247243

248244
lock_kernel();
249-
coda_vfs_stat.mkdir++;
250245

251246
if (coda_isroot(dir) && coda_iscontrol(name, len)) {
252247
unlock_kernel();
@@ -288,7 +283,6 @@ static int coda_link(struct dentry *source_de, struct inode *dir_inode,
288283
int error;
289284

290285
lock_kernel();
291-
coda_vfs_stat.link++;
292286

293287
if (coda_isroot(dir_inode) && coda_iscontrol(name, len)) {
294288
unlock_kernel();
@@ -320,10 +314,9 @@ static int coda_symlink(struct inode *dir_inode, struct dentry *de,
320314
const char *name = de->d_name.name;
321315
int len = de->d_name.len;
322316
int symlen;
323-
int error=0;
324-
317+
int error = 0;
318+
325319
lock_kernel();
326-
coda_vfs_stat.symlink++;
327320

328321
if (coda_isroot(dir_inode) && coda_iscontrol(name, len)) {
329322
unlock_kernel();
@@ -360,7 +353,6 @@ int coda_unlink(struct inode *dir, struct dentry *de)
360353
int len = de->d_name.len;
361354

362355
lock_kernel();
363-
coda_vfs_stat.unlink++;
364356

365357
error = venus_remove(dir->i_sb, coda_i2f(dir), name, len);
366358
if ( error ) {
@@ -381,7 +373,6 @@ int coda_rmdir(struct inode *dir, struct dentry *de)
381373
int error;
382374

383375
lock_kernel();
384-
coda_vfs_stat.rmdir++;
385376

386377
error = venus_rmdir(dir->i_sb, coda_i2f(dir), name, len);
387378
if (!error) {
@@ -408,7 +399,6 @@ static int coda_rename(struct inode *old_dir, struct dentry *old_dentry,
408399
int error;
409400

410401
lock_kernel();
411-
coda_vfs_stat.rename++;
412402

413403
error = venus_rename(old_dir->i_sb, coda_i2f(old_dir),
414404
coda_i2f(new_dir), old_length, new_length,
@@ -445,8 +435,6 @@ int coda_readdir(struct file *coda_file, void *buf, filldir_t filldir)
445435
BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC);
446436
host_file = cfi->cfi_container;
447437

448-
coda_vfs_stat.readdir++;
449-
450438
if (!host_file->f_op)
451439
return -ENOTDIR;
452440

‎fs/coda/file.c‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include <linux/coda_linux.h>
2323
#include <linux/coda_fs_i.h>
2424
#include <linux/coda_psdev.h>
25-
#include <linux/coda_proc.h>
2625

2726
#include "coda_int.h"
2827

@@ -134,8 +133,6 @@ int coda_open(struct inode *coda_inode, struct file *coda_file)
134133
unsigned short coda_flags = coda_flags_to_cflags(flags);
135134
struct coda_file_info *cfi;
136135

137-
coda_vfs_stat.open++;
138-
139136
cfi = kmalloc(sizeof(struct coda_file_info), GFP_KERNEL);
140137
if (!cfi)
141138
return -ENOMEM;
@@ -176,8 +173,6 @@ int coda_flush(struct file *coda_file, fl_owner_t id)
176173

177174
lock_kernel();
178175

179-
coda_vfs_stat.flush++;
180-
181176
/* last close semantics */
182177
fcnt = file_count(coda_file);
183178
if (fcnt > 1)
@@ -219,8 +214,7 @@ int coda_release(struct inode *coda_inode, struct file *coda_file)
219214
int err = 0;
220215

221216
lock_kernel();
222-
coda_vfs_stat.release++;
223-
217+
224218
if (!use_coda_close) {
225219
err = venus_release(coda_inode->i_sb, coda_i2f(coda_inode),
226220
coda_flags);
@@ -271,8 +265,6 @@ int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync)
271265
BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC);
272266
host_file = cfi->cfi_container;
273267

274-
coda_vfs_stat.fsync++;
275-
276268
if (host_file->f_op && host_file->f_op->fsync) {
277269
host_dentry = host_file->f_path.dentry;
278270
host_inode = host_dentry->d_inode;

‎fs/coda/psdev.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
#include <linux/coda_linux.h>
4646
#include <linux/coda_fs_i.h>
4747
#include <linux/coda_psdev.h>
48-
#include <linux/coda_proc.h>
4948

5049
#include "coda_int.h"
5150

‎fs/coda/symlink.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include <linux/coda_linux.h>
2121
#include <linux/coda_psdev.h>
2222
#include <linux/coda_fs_i.h>
23-
#include <linux/coda_proc.h>
2423

2524
static int coda_symlink_filler(struct file *file, struct page *page)
2625
{
@@ -32,7 +31,6 @@ static int coda_symlink_filler(struct file *file, struct page *page)
3231

3332
lock_kernel();
3433
cii = ITOC(inode);
35-
coda_vfs_stat.follow_link++;
3634

3735
error = venus_readlink(inode->i_sb, &cii->c_fid, p, &len);
3836
unlock_kernel();

0 commit comments

Comments
 (0)