Skip to content

Commit

Permalink
coda: remove statistics counters from /proc/fs/coda
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jaharkes authored and Linus Torvalds committed Jul 19, 2007
1 parent a1b0aa8 commit 3cf01f2
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 333 deletions.
7 changes: 7 additions & 0 deletions fs/coda/coda_int.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
#ifndef _CODA_INT_
#define _CODA_INT_

struct dentry;

extern struct file_system_type coda_fs_type;
extern unsigned long coda_timeout;
extern int coda_hard;
extern int coda_fake_statfs;

void coda_destroy_inodecache(void);
int coda_init_inodecache(void);
int coda_fsync(struct file *coda_file, struct dentry *coda_dentry,
int datasync);
void coda_sysctl_init(void);
void coda_sysctl_clean(void);

#endif /* _CODA_INT_ */

Expand Down
16 changes: 2 additions & 14 deletions fs/coda/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <linux/coda_psdev.h>
#include <linux/coda_fs_i.h>
#include <linux/coda_cache.h>
#include <linux/coda_proc.h>

#include "coda_int.h"

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

lock_kernel();

coda_vfs_stat.permission++;

if (coda_cache_check(inode, mask))
goto out;

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

lock_kernel();
coda_vfs_stat.create++;

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

lock_kernel();
coda_vfs_stat.mkdir++;

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

lock_kernel();
coda_vfs_stat.link++;

if (coda_isroot(dir_inode) && coda_iscontrol(name, len)) {
unlock_kernel();
Expand Down Expand Up @@ -320,10 +314,9 @@ static int coda_symlink(struct inode *dir_inode, struct dentry *de,
const char *name = de->d_name.name;
int len = de->d_name.len;
int symlen;
int error=0;
int error = 0;

lock_kernel();
coda_vfs_stat.symlink++;

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

lock_kernel();
coda_vfs_stat.unlink++;

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

lock_kernel();
coda_vfs_stat.rmdir++;

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

lock_kernel();
coda_vfs_stat.rename++;

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

coda_vfs_stat.readdir++;

if (!host_file->f_op)
return -ENOTDIR;

Expand Down
10 changes: 1 addition & 9 deletions fs/coda/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <linux/coda_linux.h>
#include <linux/coda_fs_i.h>
#include <linux/coda_psdev.h>
#include <linux/coda_proc.h>

#include "coda_int.h"

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

coda_vfs_stat.open++;

cfi = kmalloc(sizeof(struct coda_file_info), GFP_KERNEL);
if (!cfi)
return -ENOMEM;
Expand Down Expand Up @@ -176,8 +173,6 @@ int coda_flush(struct file *coda_file, fl_owner_t id)

lock_kernel();

coda_vfs_stat.flush++;

/* last close semantics */
fcnt = file_count(coda_file);
if (fcnt > 1)
Expand Down Expand Up @@ -219,8 +214,7 @@ int coda_release(struct inode *coda_inode, struct file *coda_file)
int err = 0;

lock_kernel();
coda_vfs_stat.release++;


if (!use_coda_close) {
err = venus_release(coda_inode->i_sb, coda_i2f(coda_inode),
coda_flags);
Expand Down Expand Up @@ -271,8 +265,6 @@ int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync)
BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC);
host_file = cfi->cfi_container;

coda_vfs_stat.fsync++;

if (host_file->f_op && host_file->f_op->fsync) {
host_dentry = host_file->f_path.dentry;
host_inode = host_dentry->d_inode;
Expand Down
1 change: 0 additions & 1 deletion fs/coda/psdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include <linux/coda_linux.h>
#include <linux/coda_fs_i.h>
#include <linux/coda_psdev.h>
#include <linux/coda_proc.h>

#include "coda_int.h"

Expand Down
2 changes: 0 additions & 2 deletions fs/coda/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <linux/coda_linux.h>
#include <linux/coda_psdev.h>
#include <linux/coda_fs_i.h>
#include <linux/coda_proc.h>

static int coda_symlink_filler(struct file *file, struct page *page)
{
Expand All @@ -32,7 +31,6 @@ static int coda_symlink_filler(struct file *file, struct page *page)

lock_kernel();
cii = ITOC(inode);
coda_vfs_stat.follow_link++;

error = venus_readlink(inode->i_sb, &cii->c_fid, p, &len);
unlock_kernel();
Expand Down
Loading

0 comments on commit 3cf01f2

Please sign in to comment.