Commit 6a6b3d01 authored by David Teigland's avatar David Teigland Committed by Steven Whitehouse

[GFS2] Patch to remove stats gathering from GFS2

Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 8d3b35a4
...@@ -106,8 +106,6 @@ static void glock_free(struct gfs2_glock *gl) ...@@ -106,8 +106,6 @@ static void glock_free(struct gfs2_glock *gl)
gfs2_aspace_put(aspace); gfs2_aspace_put(aspace);
kmem_cache_free(gfs2_glock_cachep, gl); kmem_cache_free(gfs2_glock_cachep, gl);
atomic_dec(&sdp->sd_glock_count);
} }
/** /**
...@@ -316,8 +314,6 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, uint64_t number, ...@@ -316,8 +314,6 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, uint64_t number,
if (error) if (error)
goto fail_aspace; goto fail_aspace;
atomic_inc(&sdp->sd_glock_count);
write_lock(&bucket->hb_lock); write_lock(&bucket->hb_lock);
tmp = search_bucket(bucket, &name); tmp = search_bucket(bucket, &name);
if (tmp) { if (tmp) {
...@@ -836,13 +832,10 @@ static void state_change(struct gfs2_glock *gl, unsigned int new_state) ...@@ -836,13 +832,10 @@ static void state_change(struct gfs2_glock *gl, unsigned int new_state)
held2 = (new_state != LM_ST_UNLOCKED); held2 = (new_state != LM_ST_UNLOCKED);
if (held1 != held2) { if (held1 != held2) {
if (held2) { if (held2)
atomic_inc(&sdp->sd_glock_held_count);
gfs2_glock_hold(gl); gfs2_glock_hold(gl);
} else { else
atomic_dec(&sdp->sd_glock_held_count);
gfs2_glock_put(gl); gfs2_glock_put(gl);
}
} }
gl->gl_state = new_state; gl->gl_state = new_state;
...@@ -994,8 +987,6 @@ void gfs2_glock_xmote_th(struct gfs2_glock *gl, unsigned int state, int flags) ...@@ -994,8 +987,6 @@ void gfs2_glock_xmote_th(struct gfs2_glock *gl, unsigned int state, int flags)
gfs2_glock_hold(gl); gfs2_glock_hold(gl);
gl->gl_req_bh = xmote_bh; gl->gl_req_bh = xmote_bh;
atomic_inc(&sdp->sd_lm_lock_calls);
lck_ret = gfs2_lm_lock(sdp, gl->gl_lock, gl->gl_state, state, lck_ret = gfs2_lm_lock(sdp, gl->gl_lock, gl->gl_state, state,
lck_flags); lck_flags);
...@@ -1087,8 +1078,6 @@ void gfs2_glock_drop_th(struct gfs2_glock *gl) ...@@ -1087,8 +1078,6 @@ void gfs2_glock_drop_th(struct gfs2_glock *gl)
gfs2_glock_hold(gl); gfs2_glock_hold(gl);
gl->gl_req_bh = drop_bh; gl->gl_req_bh = drop_bh;
atomic_inc(&sdp->sd_lm_unlock_calls);
ret = gfs2_lm_unlock(sdp, gl->gl_lock, gl->gl_state); ret = gfs2_lm_unlock(sdp, gl->gl_lock, gl->gl_state);
if (gfs2_assert_withdraw(sdp, !(ret & LM_OUT_ERROR))) if (gfs2_assert_withdraw(sdp, !(ret & LM_OUT_ERROR)))
...@@ -1313,8 +1302,6 @@ int gfs2_glock_nq(struct gfs2_holder *gh) ...@@ -1313,8 +1302,6 @@ int gfs2_glock_nq(struct gfs2_holder *gh)
struct gfs2_sbd *sdp = gl->gl_sbd; struct gfs2_sbd *sdp = gl->gl_sbd;
int error = 0; int error = 0;
atomic_inc(&sdp->sd_glock_nq_calls);
restart: restart:
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) { if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) {
set_bit(HIF_ABORTED, &gh->gh_iflags); set_bit(HIF_ABORTED, &gh->gh_iflags);
...@@ -1406,8 +1393,6 @@ void gfs2_glock_dq(struct gfs2_holder *gh) ...@@ -1406,8 +1393,6 @@ void gfs2_glock_dq(struct gfs2_holder *gh)
struct gfs2_sbd *sdp = gl->gl_sbd; struct gfs2_sbd *sdp = gl->gl_sbd;
struct gfs2_glock_operations *glops = gl->gl_ops; struct gfs2_glock_operations *glops = gl->gl_ops;
atomic_inc(&sdp->sd_glock_dq_calls);
if (gh->gh_flags & GL_SYNC) if (gh->gh_flags & GL_SYNC)
set_bit(GLF_SYNC, &gl->gl_flags); set_bit(GLF_SYNC, &gl->gl_flags);
...@@ -1469,8 +1454,6 @@ void gfs2_glock_prefetch(struct gfs2_glock *gl, unsigned int state, int flags) ...@@ -1469,8 +1454,6 @@ void gfs2_glock_prefetch(struct gfs2_glock *gl, unsigned int state, int flags)
spin_unlock(&gl->gl_spin); spin_unlock(&gl->gl_spin);
glops->go_xmote_th(gl, state, flags); glops->go_xmote_th(gl, state, flags);
atomic_inc(&gl->gl_sbd->sd_glock_prefetch_calls);
} }
/** /**
...@@ -1916,8 +1899,6 @@ void gfs2_glock_cb(lm_fsdata_t *fsdata, unsigned int type, void *data) ...@@ -1916,8 +1899,6 @@ void gfs2_glock_cb(lm_fsdata_t *fsdata, unsigned int type, void *data)
{ {
struct gfs2_sbd *sdp = (struct gfs2_sbd *)fsdata; struct gfs2_sbd *sdp = (struct gfs2_sbd *)fsdata;
atomic_inc(&sdp->sd_lm_callbacks);
switch (type) { switch (type) {
case LM_CB_NEED_E: case LM_CB_NEED_E:
blocking_cb(sdp, (struct lm_lockname *)data, LM_ST_UNLOCKED); blocking_cb(sdp, (struct lm_lockname *)data, LM_ST_UNLOCKED);
......
...@@ -667,27 +667,7 @@ struct gfs2_sbd { ...@@ -667,27 +667,7 @@ struct gfs2_sbd {
atomic_t sd_glock_count; atomic_t sd_glock_count;
atomic_t sd_glock_held_count; atomic_t sd_glock_held_count;
atomic_t sd_inode_count; atomic_t sd_inode_count;
atomic_t sd_bufdata_count;
atomic_t sd_fh2dentry_misses;
atomic_t sd_reclaimed; atomic_t sd_reclaimed;
atomic_t sd_log_flush_incore;
atomic_t sd_log_flush_ondisk;
atomic_t sd_glock_nq_calls;
atomic_t sd_glock_dq_calls;
atomic_t sd_glock_prefetch_calls;
atomic_t sd_lm_lock_calls;
atomic_t sd_lm_unlock_calls;
atomic_t sd_lm_callbacks;
atomic_t sd_ops_address;
atomic_t sd_ops_dentry;
atomic_t sd_ops_export;
atomic_t sd_ops_file;
atomic_t sd_ops_inode;
atomic_t sd_ops_super;
atomic_t sd_ops_vm;
char sd_fsname[GFS2_FSNAME_LEN]; char sd_fsname[GFS2_FSNAME_LEN];
char sd_table_name[GFS2_FSNAME_LEN]; char sd_table_name[GFS2_FSNAME_LEN];
......
...@@ -408,8 +408,6 @@ static void log_write_header(struct gfs2_sbd *sdp, uint32_t flags, int pull) ...@@ -408,8 +408,6 @@ static void log_write_header(struct gfs2_sbd *sdp, uint32_t flags, int pull)
unsigned int tail; unsigned int tail;
uint32_t hash; uint32_t hash;
atomic_inc(&sdp->sd_log_flush_ondisk);
bh = sb_getblk(sdp->sd_vfs, blkno); bh = sb_getblk(sdp->sd_vfs, blkno);
lock_buffer(bh); lock_buffer(bh);
memset(bh->b_data, 0, bh->b_size); memset(bh->b_data, 0, bh->b_size);
...@@ -488,8 +486,6 @@ void gfs2_log_flush_i(struct gfs2_sbd *sdp, struct gfs2_glock *gl) ...@@ -488,8 +486,6 @@ void gfs2_log_flush_i(struct gfs2_sbd *sdp, struct gfs2_glock *gl)
{ {
struct gfs2_ail *ai; struct gfs2_ail *ai;
atomic_inc(&sdp->sd_log_flush_incore);
ai = kzalloc(sizeof(struct gfs2_ail), GFP_NOFS | __GFP_NOFAIL); ai = kzalloc(sizeof(struct gfs2_ail), GFP_NOFS | __GFP_NOFAIL);
INIT_LIST_HEAD(&ai->ai_ail1_list); INIT_LIST_HEAD(&ai->ai_ail1_list);
INIT_LIST_HEAD(&ai->ai_ail2_list); INIT_LIST_HEAD(&ai->ai_ail2_list);
......
...@@ -146,7 +146,6 @@ static int gfs2_aspace_releasepage(struct page *page, gfp_t gfp_mask) ...@@ -146,7 +146,6 @@ static int gfs2_aspace_releasepage(struct page *page, gfp_t gfp_mask)
gfs2_assert_warn(sdp, list_empty(&bd->bd_le.le_list)); gfs2_assert_warn(sdp, list_empty(&bd->bd_le.le_list));
gfs2_assert_warn(sdp, !bd->bd_ail); gfs2_assert_warn(sdp, !bd->bd_ail);
kmem_cache_free(gfs2_bufdata_cachep, bd); kmem_cache_free(gfs2_bufdata_cachep, bd);
atomic_dec(&sdp->sd_bufdata_count);
set_v2bd(bh, NULL); set_v2bd(bh, NULL);
} }
...@@ -557,8 +556,6 @@ void gfs2_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh, int meta ...@@ -557,8 +556,6 @@ void gfs2_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh, int meta
} }
bd = kmem_cache_alloc(gfs2_bufdata_cachep, GFP_NOFS | __GFP_NOFAIL), bd = kmem_cache_alloc(gfs2_bufdata_cachep, GFP_NOFS | __GFP_NOFAIL),
atomic_inc(&gl->gl_sbd->sd_bufdata_count);
memset(bd, 0, sizeof(struct gfs2_bufdata)); memset(bd, 0, sizeof(struct gfs2_bufdata));
bd->bd_bh = bh; bd->bd_bh = bh;
......
...@@ -166,7 +166,6 @@ static int gfs2_writepage(struct page *page, struct writeback_control *wbc) ...@@ -166,7 +166,6 @@ static int gfs2_writepage(struct page *page, struct writeback_control *wbc)
int error; int error;
int done_trans = 0; int done_trans = 0;
atomic_inc(&sdp->sd_ops_address);
if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl))) { if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl))) {
unlock_page(page); unlock_page(page);
return -EIO; return -EIO;
...@@ -265,8 +264,6 @@ static int gfs2_readpage(struct file *file, struct page *page) ...@@ -265,8 +264,6 @@ static int gfs2_readpage(struct file *file, struct page *page)
struct gfs2_holder gh; struct gfs2_holder gh;
int error; int error;
atomic_inc(&sdp->sd_ops_address);
if (file != &gfs2_internal_file_sentinal) { if (file != &gfs2_internal_file_sentinal) {
gfs2_holder_init(ip->i_gl, LM_ST_SHARED, GL_ATIME, &gh); gfs2_holder_init(ip->i_gl, LM_ST_SHARED, GL_ATIME, &gh);
error = gfs2_glock_nq_m_atime(1, &gh); error = gfs2_glock_nq_m_atime(1, &gh);
...@@ -319,8 +316,6 @@ static int gfs2_prepare_write(struct file *file, struct page *page, ...@@ -319,8 +316,6 @@ static int gfs2_prepare_write(struct file *file, struct page *page,
loff_t end = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to; loff_t end = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to;
struct gfs2_alloc *al; struct gfs2_alloc *al;
atomic_inc(&sdp->sd_ops_address);
gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_ATIME, &ip->i_gh); gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_ATIME, &ip->i_gh);
error = gfs2_glock_nq_m_atime(1, &ip->i_gh); error = gfs2_glock_nq_m_atime(1, &ip->i_gh);
if (error) if (error)
...@@ -412,9 +407,6 @@ static int gfs2_commit_write(struct file *file, struct page *page, ...@@ -412,9 +407,6 @@ static int gfs2_commit_write(struct file *file, struct page *page,
struct buffer_head *dibh; struct buffer_head *dibh;
struct gfs2_alloc *al = &ip->i_alloc;; struct gfs2_alloc *al = &ip->i_alloc;;
atomic_inc(&sdp->sd_ops_address);
if (gfs2_assert_withdraw(sdp, gfs2_glock_is_locked_by_me(ip->i_gl))) if (gfs2_assert_withdraw(sdp, gfs2_glock_is_locked_by_me(ip->i_gl)))
goto fail_nounlock; goto fail_nounlock;
...@@ -493,8 +485,6 @@ static sector_t gfs2_bmap(struct address_space *mapping, sector_t lblock) ...@@ -493,8 +485,6 @@ static sector_t gfs2_bmap(struct address_space *mapping, sector_t lblock)
sector_t dblock = 0; sector_t dblock = 0;
int error; int error;
atomic_inc(&ip->i_sbd->sd_ops_address);
error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh); error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh);
if (error) if (error)
return 0; return 0;
...@@ -615,8 +605,6 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb, ...@@ -615,8 +605,6 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb,
struct gfs2_inode *ip = get_v2ip(inode); struct gfs2_inode *ip = get_v2ip(inode);
struct gfs2_sbd *sdp = ip->i_sbd; struct gfs2_sbd *sdp = ip->i_sbd;
atomic_inc(&sdp->sd_ops_address);
if (rw == WRITE) if (rw == WRITE)
return gfs2_direct_IO_write(iocb, iov, offset, nr_segs); return gfs2_direct_IO_write(iocb, iov, offset, nr_segs);
......
...@@ -45,8 +45,6 @@ static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd) ...@@ -45,8 +45,6 @@ static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd)
lock_kernel(); lock_kernel();
atomic_inc(&sdp->sd_ops_dentry);
inode = dentry->d_inode; inode = dentry->d_inode;
if (inode && is_bad_inode(inode)) if (inode && is_bad_inode(inode))
goto invalid; goto invalid;
......
...@@ -32,8 +32,6 @@ static struct dentry *gfs2_decode_fh(struct super_block *sb, ...@@ -32,8 +32,6 @@ static struct dentry *gfs2_decode_fh(struct super_block *sb,
{ {
struct gfs2_inum this, parent; struct gfs2_inum this, parent;
atomic_inc(&get_v2sdp(sb)->sd_ops_export);
if (fh_type != fh_len) if (fh_type != fh_len)
return NULL; return NULL;
...@@ -66,8 +64,6 @@ static int gfs2_encode_fh(struct dentry *dentry, __u32 *fh, int *len, ...@@ -66,8 +64,6 @@ static int gfs2_encode_fh(struct dentry *dentry, __u32 *fh, int *len,
struct gfs2_inode *ip = get_v2ip(inode); struct gfs2_inode *ip = get_v2ip(inode);
struct gfs2_sbd *sdp = ip->i_sbd; struct gfs2_sbd *sdp = ip->i_sbd;
atomic_inc(&sdp->sd_ops_export);
if (*len < 4 || (connectable && *len < 8)) if (*len < 4 || (connectable && *len < 8))
return 255; return 255;
...@@ -139,8 +135,6 @@ static int gfs2_get_name(struct dentry *parent, char *name, ...@@ -139,8 +135,6 @@ static int gfs2_get_name(struct dentry *parent, char *name,
if (!dir) if (!dir)
return -EINVAL; return -EINVAL;
atomic_inc(&get_v2sdp(dir->i_sb)->sd_ops_export);
if (!S_ISDIR(dir->i_mode) || !inode) if (!S_ISDIR(dir->i_mode) || !inode)
return -EINVAL; return -EINVAL;
...@@ -173,8 +167,6 @@ static struct dentry *gfs2_get_parent(struct dentry *child) ...@@ -173,8 +167,6 @@ static struct dentry *gfs2_get_parent(struct dentry *child)
struct dentry *dentry; struct dentry *dentry;
int error; int error;
atomic_inc(&dip->i_sbd->sd_ops_export);
error = gfs2_lookupi(child->d_inode, &dotdot, 1, &inode); error = gfs2_lookupi(child->d_inode, &dotdot, 1, &inode);
if (error) if (error)
return ERR_PTR(error); return ERR_PTR(error);
...@@ -199,8 +191,6 @@ static struct dentry *gfs2_get_dentry(struct super_block *sb, void *inum_p) ...@@ -199,8 +191,6 @@ static struct dentry *gfs2_get_dentry(struct super_block *sb, void *inum_p)
struct dentry *dentry; struct dentry *dentry;
int error; int error;
atomic_inc(&sdp->sd_ops_export);
/* System files? */ /* System files? */
inode = gfs2_iget(sb, inum); inode = gfs2_iget(sb, inum);
...@@ -256,8 +246,6 @@ static struct dentry *gfs2_get_dentry(struct super_block *sb, void *inum_p) ...@@ -256,8 +246,6 @@ static struct dentry *gfs2_get_dentry(struct super_block *sb, void *inum_p)
goto fail; goto fail;
} }
atomic_inc(&sdp->sd_fh2dentry_misses);
out_ip: out_ip:
error = -EIO; error = -EIO;
if (ip->i_di.di_flags & GFS2_DIF_SYSTEM) { if (ip->i_di.di_flags & GFS2_DIF_SYSTEM) {
......
...@@ -129,8 +129,6 @@ static loff_t gfs2_llseek(struct file *file, loff_t offset, int origin) ...@@ -129,8 +129,6 @@ static loff_t gfs2_llseek(struct file *file, loff_t offset, int origin)
struct gfs2_holder i_gh; struct gfs2_holder i_gh;
loff_t error; loff_t error;
atomic_inc(&ip->i_sbd->sd_ops_file);
if (origin == 2) { if (origin == 2) {
error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY,
&i_gh); &i_gh);
...@@ -278,8 +276,6 @@ static ssize_t gfs2_read(struct file *filp, char __user *buf, size_t size, ...@@ -278,8 +276,6 @@ static ssize_t gfs2_read(struct file *filp, char __user *buf, size_t size,
struct kiocb kiocb; struct kiocb kiocb;
ssize_t ret; ssize_t ret;
atomic_inc(&get_v2sdp(filp->f_mapping->host->i_sb)->sd_ops_file);
init_sync_kiocb(&kiocb, filp); init_sync_kiocb(&kiocb, filp);
ret = __gfs2_file_aio_read(&kiocb, &local_iov, 1, offset); ret = __gfs2_file_aio_read(&kiocb, &local_iov, 1, offset);
if (-EIOCBQUEUED == ret) if (-EIOCBQUEUED == ret)
...@@ -293,8 +289,6 @@ static ssize_t gfs2_file_readv(struct file *filp, const struct iovec *iov, ...@@ -293,8 +289,6 @@ static ssize_t gfs2_file_readv(struct file *filp, const struct iovec *iov,
struct kiocb kiocb; struct kiocb kiocb;
ssize_t ret; ssize_t ret;
atomic_inc(&get_v2sdp(filp->f_mapping->host->i_sb)->sd_ops_file);
init_sync_kiocb(&kiocb, filp); init_sync_kiocb(&kiocb, filp);
ret = __gfs2_file_aio_read(&kiocb, iov, nr_segs, ppos); ret = __gfs2_file_aio_read(&kiocb, iov, nr_segs, ppos);
if (-EIOCBQUEUED == ret) if (-EIOCBQUEUED == ret)
...@@ -308,8 +302,6 @@ static ssize_t gfs2_file_aio_read(struct kiocb *iocb, char __user *buf, ...@@ -308,8 +302,6 @@ static ssize_t gfs2_file_aio_read(struct kiocb *iocb, char __user *buf,
struct file *filp = iocb->ki_filp; struct file *filp = iocb->ki_filp;
struct iovec local_iov = { .iov_base = buf, .iov_len = count }; struct iovec local_iov = { .iov_base = buf, .iov_len = count };
atomic_inc(&get_v2sdp(filp->f_mapping->host->i_sb)->sd_ops_file);
BUG_ON(iocb->ki_pos != pos); BUG_ON(iocb->ki_pos != pos);
return __gfs2_file_aio_read(iocb, &local_iov, 1, &iocb->ki_pos); return __gfs2_file_aio_read(iocb, &local_iov, 1, &iocb->ki_pos);
} }
...@@ -529,8 +521,6 @@ static int gfs2_readdir(struct file *file, void *dirent, filldir_t filldir) ...@@ -529,8 +521,6 @@ static int gfs2_readdir(struct file *file, void *dirent, filldir_t filldir)
{ {
int error; int error;
atomic_inc(&get_v2sdp(file->f_mapping->host->i_sb)->sd_ops_file);
if (strcmp(current->comm, "nfsd") != 0) if (strcmp(current->comm, "nfsd") != 0)
error = readdir_reg(file, dirent, filldir); error = readdir_reg(file, dirent, filldir);
else else
...@@ -539,7 +529,8 @@ static int gfs2_readdir(struct file *file, void *dirent, filldir_t filldir) ...@@ -539,7 +529,8 @@ static int gfs2_readdir(struct file *file, void *dirent, filldir_t filldir)
return error; return error;
} }
static int gfs2_ioctl_flags(struct gfs2_inode *ip, unsigned int cmd, unsigned long arg) static int gfs2_ioctl_flags(struct gfs2_inode *ip, unsigned int cmd,
unsigned long arg)
{ {
unsigned int lmode = (cmd == GFS2_IOCTL_SETFLAGS) ? LM_ST_EXCLUSIVE : LM_ST_SHARED; unsigned int lmode = (cmd == GFS2_IOCTL_SETFLAGS) ? LM_ST_EXCLUSIVE : LM_ST_SHARED;
struct buffer_head *dibh; struct buffer_head *dibh;
...@@ -618,8 +609,6 @@ static int gfs2_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -618,8 +609,6 @@ static int gfs2_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
{ {
struct gfs2_inode *ip = get_v2ip(inode); struct gfs2_inode *ip = get_v2ip(inode);
atomic_inc(&ip->i_sbd->sd_ops_file);
switch (cmd) { switch (cmd) {
case GFS2_IOCTL_SETFLAGS: case GFS2_IOCTL_SETFLAGS:
case GFS2_IOCTL_GETFLAGS: case GFS2_IOCTL_GETFLAGS:
...@@ -644,8 +633,6 @@ static int gfs2_mmap(struct file *file, struct vm_area_struct *vma) ...@@ -644,8 +633,6 @@ static int gfs2_mmap(struct file *file, struct vm_area_struct *vma)
struct gfs2_holder i_gh; struct gfs2_holder i_gh;
int error; int error;
atomic_inc(&ip->i_sbd->sd_ops_file);
gfs2_holder_init(ip->i_gl, LM_ST_SHARED, GL_ATIME, &i_gh); gfs2_holder_init(ip->i_gl, LM_ST_SHARED, GL_ATIME, &i_gh);
error = gfs2_glock_nq_atime(&i_gh); error = gfs2_glock_nq_atime(&i_gh);
if (error) { if (error) {
...@@ -682,8 +669,6 @@ static int gfs2_open(struct inode *inode, struct file *file) ...@@ -682,8 +669,6 @@ static int gfs2_open(struct inode *inode, struct file *file)
struct gfs2_file *fp; struct gfs2_file *fp;
int error; int error;
atomic_inc(&ip->i_sbd->sd_ops_file);
fp = kzalloc(sizeof(struct gfs2_file), GFP_KERNEL); fp = kzalloc(sizeof(struct gfs2_file), GFP_KERNEL);
if (!fp) if (!fp)
return -ENOMEM; return -ENOMEM;
...@@ -741,8 +726,6 @@ static int gfs2_close(struct inode *inode, struct file *file) ...@@ -741,8 +726,6 @@ static int gfs2_close(struct inode *inode, struct file *file)
struct gfs2_sbd *sdp = get_v2sdp(inode->i_sb); struct gfs2_sbd *sdp = get_v2sdp(inode->i_sb);
struct gfs2_file *fp; struct gfs2_file *fp;
atomic_inc(&sdp->sd_ops_file);
fp = get_v2fp(file); fp = get_v2fp(file);
set_v2fp(file, NULL); set_v2fp(file, NULL);
...@@ -766,7 +749,6 @@ static int gfs2_fsync(struct file *file, struct dentry *dentry, int datasync) ...@@ -766,7 +749,6 @@ static int gfs2_fsync(struct file *file, struct dentry *dentry, int datasync)
{ {
struct gfs2_inode *ip = get_v2ip(dentry->d_inode); struct gfs2_inode *ip = get_v2ip(dentry->d_inode);
atomic_inc(&ip->i_sbd->sd_ops_file);
gfs2_log_flush_glock(ip->i_gl); gfs2_log_flush_glock(ip->i_gl);
return 0; return 0;
...@@ -789,8 +771,6 @@ static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl) ...@@ -789,8 +771,6 @@ static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl)
{ .ln_number = ip->i_num.no_addr, { .ln_number = ip->i_num.no_addr,
.ln_type = LM_TYPE_PLOCK }; .ln_type = LM_TYPE_PLOCK };
atomic_inc(&sdp->sd_ops_file);
if (!(fl->fl_flags & FL_POSIX)) if (!(fl->fl_flags & FL_POSIX))
return -ENOLCK; return -ENOLCK;
if ((ip->i_di.di_mode & (S_ISGID | S_IXGRP)) == S_ISGID) if ((ip->i_di.di_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
...@@ -839,9 +819,6 @@ static ssize_t gfs2_sendfile(struct file *in_file, loff_t *offset, size_t count, ...@@ -839,9 +819,6 @@ static ssize_t gfs2_sendfile(struct file *in_file, loff_t *offset, size_t count,
read_actor_t actor, void *target) read_actor_t actor, void *target)
{ {
struct gfs2_inode *ip = get_v2ip(in_file->f_mapping->host); struct gfs2_inode *ip = get_v2ip(in_file->f_mapping->host);
atomic_inc(&ip->i_sbd->sd_ops_file);
return generic_file_sendfile(in_file, offset, count, actor, target); return generic_file_sendfile(in_file, offset, count, actor, target);
} }
...@@ -921,8 +898,6 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl) ...@@ -921,8 +898,6 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl)
struct gfs2_inode *ip = get_v2ip(file->f_mapping->host); struct gfs2_inode *ip = get_v2ip(file->f_mapping->host);
struct gfs2_sbd *sdp = ip->i_sbd; struct gfs2_sbd *sdp = ip->i_sbd;
atomic_inc(&ip->i_sbd->sd_ops_file);
if (!(fl->fl_flags & FL_FLOCK)) if (!(fl->fl_flags & FL_FLOCK))
return -ENOLCK; return -ENOLCK;
if ((ip->i_di.di_mode & (S_ISGID | S_IXGRP)) == S_ISGID) if ((ip->i_di.di_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
......
...@@ -56,8 +56,6 @@ static int gfs2_create(struct inode *dir, struct dentry *dentry, ...@@ -56,8 +56,6 @@ static int gfs2_create(struct inode *dir, struct dentry *dentry,
int new = 1; int new = 1;
int error; int error;
atomic_inc(&sdp->sd_ops_inode);
gfs2_holder_init(dip->i_gl, 0, 0, ghs); gfs2_holder_init(dip->i_gl, 0, 0, ghs);
for (;;) { for (;;) {
...@@ -113,8 +111,6 @@ static struct dentry *gfs2_lookup(struct inode *dir, struct dentry *dentry, ...@@ -113,8 +111,6 @@ static struct dentry *gfs2_lookup(struct inode *dir, struct dentry *dentry,
struct inode *inode = NULL; struct inode *inode = NULL;
int error; int error;
atomic_inc(&sdp->sd_ops_inode);
if (!sdp->sd_args.ar_localcaching) if (!sdp->sd_args.ar_localcaching)
dentry->d_op = &gfs2_dops; dentry->d_op = &gfs2_dops;
...@@ -152,8 +148,6 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir, ...@@ -152,8 +148,6 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir,
int alloc_required; int alloc_required;
int error; int error;
atomic_inc(&sdp->sd_ops_inode);
if (S_ISDIR(ip->i_di.di_mode)) if (S_ISDIR(ip->i_di.di_mode))
return -EPERM; return -EPERM;
...@@ -287,8 +281,6 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry) ...@@ -287,8 +281,6 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry)
struct gfs2_holder ghs[2]; struct gfs2_holder ghs[2];
int error; int error;
atomic_inc(&sdp->sd_ops_inode);
error = gfs2_unlinked_get(sdp, &ul); error = gfs2_unlinked_get(sdp, &ul);
if (error) if (error)
return error; return error;
...@@ -345,8 +337,6 @@ static int gfs2_symlink(struct inode *dir, struct dentry *dentry, ...@@ -345,8 +337,6 @@ static int gfs2_symlink(struct inode *dir, struct dentry *dentry,
int size; int size;
int error; int error;
atomic_inc(&sdp->sd_ops_inode);
/* Must be stuffed with a null terminator for gfs2_follow_link() */ /* Must be stuffed with a null terminator for gfs2_follow_link() */
size = strlen(symname); size = strlen(symname);
if (size > sdp->sd_sb.sb_bsize - sizeof(struct gfs2_dinode) - 1) if (size > sdp->sd_sb.sb_bsize - sizeof(struct gfs2_dinode) - 1)
...@@ -405,8 +395,6 @@ static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, int mode) ...@@ -405,8 +395,6 @@ static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, int mode)
struct buffer_head *dibh; struct buffer_head *dibh;
int error; int error;
atomic_inc(&sdp->sd_ops_inode);
gfs2_holder_init(dip->i_gl, 0, 0, ghs); gfs2_holder_init(dip->i_gl, 0, 0, ghs);
inode = gfs2_createi(ghs, &dentry->d_name, S_IFDIR | mode); inode = gfs2_createi(ghs, &dentry->d_name, S_IFDIR | mode);
...@@ -487,8 +475,6 @@ static int gfs2_rmdir(struct inode *dir, struct dentry *dentry) ...@@ -487,8 +475,6 @@ static int gfs2_rmdir(struct inode *dir, struct dentry *dentry)
struct gfs2_holder ghs[2]; struct gfs2_holder ghs[2];
int error; int error;
atomic_inc(&sdp->sd_ops_inode);
error = gfs2_unlinked_get(sdp, &ul); error = gfs2_unlinked_get(sdp, &ul);
if (error) if (error)
return error; return error;
...@@ -556,8 +542,6 @@ static int gfs2_mknod(struct inode *dir, struct dentry *dentry, int mode, ...@@ -556,8 +542,6 @@ static int gfs2_mknod(struct inode *dir, struct dentry *dentry, int mode,
uint32_t major = 0, minor = 0; uint32_t major = 0, minor = 0;
int error; int error;
atomic_inc(&sdp->sd_ops_inode);
switch (mode & S_IFMT) { switch (mode & S_IFMT) {
case S_IFBLK: case S_IFBLK:
case S_IFCHR: case S_IFCHR:
...@@ -631,8 +615,6 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry, ...@@ -631,8 +615,6 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
unsigned int x; unsigned int x;
int error; int error;
atomic_inc(&sdp->sd_ops_inode);
if (ndentry->d_inode) { if (ndentry->d_inode) {
nip = get_v2ip(ndentry->d_inode); nip = get_v2ip(ndentry->d_inode);
if (ip == nip) if (ip == nip)
...@@ -871,8 +853,6 @@ static int gfs2_readlink(struct dentry *dentry, char __user *user_buf, ...@@ -871,8 +853,6 @@ static int gfs2_readlink(struct dentry *dentry, char __user *user_buf,
unsigned int len = GFS2_FAST_NAME_SIZE; unsigned int len = GFS2_FAST_NAME_SIZE;
int error; int error;
atomic_inc(&ip->i_sbd->sd_ops_inode);
error = gfs2_readlinki(ip, &buf, &len); error = gfs2_readlinki(ip, &buf, &len);
if (error) if (error)
return error; return error;
...@@ -909,8 +889,6 @@ static void *gfs2_follow_link(struct dentry *dentry, struct nameidata *nd) ...@@ -909,8 +889,6 @@ static void *gfs2_follow_link(struct dentry *dentry, struct nameidata *nd)
unsigned int len = GFS2_FAST_NAME_SIZE; unsigned int len = GFS2_FAST_NAME_SIZE;
int error; int error;
atomic_inc(&ip->i_sbd->sd_ops_inode);
error = gfs2_readlinki(ip, &buf, &len); error = gfs2_readlinki(ip, &buf, &len);
if (!error) { if (!error) {
error = vfs_follow_link(nd, buf); error = vfs_follow_link(nd, buf);
...@@ -936,8 +914,6 @@ static int gfs2_permission(struct inode *inode, int mask, struct nameidata *nd) ...@@ -936,8 +914,6 @@ static int gfs2_permission(struct inode *inode, int mask, struct nameidata *nd)
struct gfs2_holder i_gh; struct gfs2_holder i_gh;
int error; int error;
atomic_inc(&ip->i_sbd->sd_ops_inode);
if (ip->i_vn == ip->i_gl->gl_vn) if (ip->i_vn == ip->i_gl->gl_vn)
return generic_permission(inode, mask, gfs2_check_acl); return generic_permission(inode, mask, gfs2_check_acl);
...@@ -1053,8 +1029,6 @@ static int gfs2_setattr(struct dentry *dentry, struct iattr *attr) ...@@ -1053,8 +1029,6 @@ static int gfs2_setattr(struct dentry *dentry, struct iattr *attr)
struct gfs2_holder i_gh; struct gfs2_holder i_gh;
int error; int error;
atomic_inc(&ip->i_sbd->sd_ops_inode);
error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &i_gh); error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &i_gh);
if (error) if (error)
return error; return error;
...@@ -1102,8 +1076,6 @@ static int gfs2_getattr(struct vfsmount *mnt, struct dentry *dentry, ...@@ -1102,8 +1076,6 @@ static int gfs2_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct gfs2_holder gh; struct gfs2_holder gh;
int error; int error;
atomic_inc(&ip->i_sbd->sd_ops_inode);
error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &gh); error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &gh);
if (!error) { if (!error) {
generic_fillattr(inode, stat); generic_fillattr(inode, stat);
...@@ -1119,8 +1091,6 @@ static int gfs2_setxattr(struct dentry *dentry, const char *name, ...@@ -1119,8 +1091,6 @@ static int gfs2_setxattr(struct dentry *dentry, const char *name,
struct gfs2_inode *ip = get_v2ip(dentry->d_inode); struct gfs2_inode *ip = get_v2ip(dentry->d_inode);
struct gfs2_ea_request er; struct gfs2_ea_request er;
atomic_inc(&ip->i_sbd->sd_ops_inode);
memset(&er, 0, sizeof(struct gfs2_ea_request)); memset(&er, 0, sizeof(struct gfs2_ea_request));
er.er_type = gfs2_ea_name2type(name, &er.er_name); er.er_type = gfs2_ea_name2type(name, &er.er_name);
if (er.er_type == GFS2_EATYPE_UNUSED) if (er.er_type == GFS2_EATYPE_UNUSED)
...@@ -1140,8 +1110,6 @@ static ssize_t gfs2_getxattr(struct dentry *dentry, const char *name, ...@@ -1140,8 +1110,6 @@ static ssize_t gfs2_getxattr(struct dentry *dentry, const char *name,
{ {
struct gfs2_ea_request er; struct gfs2_ea_request er;
atomic_inc(&get_v2sdp(dentry->d_inode->i_sb)->sd_ops_inode);
memset(&er, 0, sizeof(struct gfs2_ea_request)); memset(&er, 0, sizeof(struct gfs2_ea_request));
er.er_type = gfs2_ea_name2type(name, &er.er_name); er.er_type = gfs2_ea_name2type(name, &er.er_name);
if (er.er_type == GFS2_EATYPE_UNUSED) if (er.er_type == GFS2_EATYPE_UNUSED)
...@@ -1157,8 +1125,6 @@ static ssize_t gfs2_listxattr(struct dentry *dentry, char *buffer, size_t size) ...@@ -1157,8 +1125,6 @@ static ssize_t gfs2_listxattr(struct dentry *dentry, char *buffer, size_t size)
{ {
struct gfs2_ea_request er; struct gfs2_ea_request er;
atomic_inc(&get_v2sdp(dentry->d_inode->i_sb)->sd_ops_inode);
memset(&er, 0, sizeof(struct gfs2_ea_request)); memset(&er, 0, sizeof(struct gfs2_ea_request));
er.er_data = (size) ? buffer : NULL; er.er_data = (size) ? buffer : NULL;
er.er_data_len = size; er.er_data_len = size;
...@@ -1170,8 +1136,6 @@ static int gfs2_removexattr(struct dentry *dentry, const char *name) ...@@ -1170,8 +1136,6 @@ static int gfs2_removexattr(struct dentry *dentry, const char *name)
{ {
struct gfs2_ea_request er; struct gfs2_ea_request er;
atomic_inc(&get_v2sdp(dentry->d_inode->i_sb)->sd_ops_inode);
memset(&er, 0, sizeof(struct gfs2_ea_request)); memset(&er, 0, sizeof(struct gfs2_ea_request));
er.er_type = gfs2_ea_name2type(name, &er.er_name); er.er_type = gfs2_ea_name2type(name, &er.er_name);
if (er.er_type == GFS2_EATYPE_UNUSED) if (er.er_type == GFS2_EATYPE_UNUSED)
......
...@@ -46,8 +46,6 @@ static int gfs2_write_inode(struct inode *inode, int sync) ...@@ -46,8 +46,6 @@ static int gfs2_write_inode(struct inode *inode, int sync)
{ {
struct gfs2_inode *ip = get_v2ip(inode); struct gfs2_inode *ip = get_v2ip(inode);
atomic_inc(&ip->i_sbd->sd_ops_super);
if (current->flags & PF_MEMALLOC) if (current->flags & PF_MEMALLOC)
return 0; return 0;
if (ip && sync) if (ip && sync)
...@@ -70,8 +68,6 @@ static void gfs2_put_super(struct super_block *sb) ...@@ -70,8 +68,6 @@ static void gfs2_put_super(struct super_block *sb)
if (!sdp) if (!sdp)
return; return;
atomic_inc(&sdp->sd_ops_super);
/* Unfreeze the filesystem, if we need to */ /* Unfreeze the filesystem, if we need to */
mutex_lock(&sdp->sd_freeze_lock); mutex_lock(&sdp->sd_freeze_lock);
...@@ -156,7 +152,6 @@ static void gfs2_put_super(struct super_block *sb) ...@@ -156,7 +152,6 @@ static void gfs2_put_super(struct super_block *sb)
static void gfs2_write_super(struct super_block *sb) static void gfs2_write_super(struct super_block *sb)
{ {
struct gfs2_sbd *sdp = get_v2sdp(sb); struct gfs2_sbd *sdp = get_v2sdp(sb);
atomic_inc(&sdp->sd_ops_super);
gfs2_log_flush(sdp); gfs2_log_flush(sdp);
} }
...@@ -171,8 +166,6 @@ static void gfs2_write_super_lockfs(struct super_block *sb) ...@@ -171,8 +166,6 @@ static void gfs2_write_super_lockfs(struct super_block *sb)
struct gfs2_sbd *sdp = get_v2sdp(sb); struct gfs2_sbd *sdp = get_v2sdp(sb);
int error; int error;
atomic_inc(&sdp->sd_ops_super);
for (;;) { for (;;) {
error = gfs2_freeze_fs(sdp); error = gfs2_freeze_fs(sdp);
if (!error) if (!error)
...@@ -202,8 +195,6 @@ static void gfs2_write_super_lockfs(struct super_block *sb) ...@@ -202,8 +195,6 @@ static void gfs2_write_super_lockfs(struct super_block *sb)
static void gfs2_unlockfs(struct super_block *sb) static void gfs2_unlockfs(struct super_block *sb)
{ {
struct gfs2_sbd *sdp = get_v2sdp(sb); struct gfs2_sbd *sdp = get_v2sdp(sb);
atomic_inc(&sdp->sd_ops_super);
gfs2_unfreeze_fs(sdp); gfs2_unfreeze_fs(sdp);
} }
...@@ -221,8 +212,6 @@ static int gfs2_statfs(struct super_block *sb, struct kstatfs *buf) ...@@ -221,8 +212,6 @@ static int gfs2_statfs(struct super_block *sb, struct kstatfs *buf)
struct gfs2_statfs_change sc; struct gfs2_statfs_change sc;
int error; int error;
atomic_inc(&sdp->sd_ops_super);
if (gfs2_tune_get(sdp, gt_statfs_slow)) if (gfs2_tune_get(sdp, gt_statfs_slow))
error = gfs2_statfs_slow(sdp, &sc); error = gfs2_statfs_slow(sdp, &sc);
else else
...@@ -259,8 +248,6 @@ static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data) ...@@ -259,8 +248,6 @@ static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data)
struct gfs2_sbd *sdp = get_v2sdp(sb); struct gfs2_sbd *sdp = get_v2sdp(sb);
int error; int error;
atomic_inc(&sdp->sd_ops_super);
error = gfs2_mount_args(sdp, data, 1); error = gfs2_mount_args(sdp, data, 1);
if (error) if (error)
return error; return error;
...@@ -298,8 +285,6 @@ static void gfs2_clear_inode(struct inode *inode) ...@@ -298,8 +285,6 @@ static void gfs2_clear_inode(struct inode *inode)
{ {
struct gfs2_inode *ip = get_v2ip(inode); struct gfs2_inode *ip = get_v2ip(inode);
atomic_inc(&get_v2sdp(inode->i_sb)->sd_ops_super);
if (ip) { if (ip) {
spin_lock(&ip->i_spin); spin_lock(&ip->i_spin);
ip->i_vnode = NULL; ip->i_vnode = NULL;
...@@ -324,8 +309,6 @@ static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt) ...@@ -324,8 +309,6 @@ static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt)
struct gfs2_sbd *sdp = get_v2sdp(mnt->mnt_sb); struct gfs2_sbd *sdp = get_v2sdp(mnt->mnt_sb);
struct gfs2_args *args = &sdp->sd_args; struct gfs2_args *args = &sdp->sd_args;
atomic_inc(&sdp->sd_ops_super);
if (args->ar_lockproto[0]) if (args->ar_lockproto[0])
seq_printf(s, ",lockproto=%s", args->ar_lockproto); seq_printf(s, ",lockproto=%s", args->ar_lockproto);
if (args->ar_locktable[0]) if (args->ar_locktable[0])
......
...@@ -48,8 +48,6 @@ static struct page *gfs2_private_nopage(struct vm_area_struct *area, ...@@ -48,8 +48,6 @@ static struct page *gfs2_private_nopage(struct vm_area_struct *area,
struct page *result; struct page *result;
int error; int error;
atomic_inc(&ip->i_sbd->sd_ops_vm);
error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, 0, &i_gh); error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, 0, &i_gh);
if (error) if (error)
return NULL; return NULL;
...@@ -149,8 +147,6 @@ static struct page *gfs2_sharewrite_nopage(struct vm_area_struct *area, ...@@ -149,8 +147,6 @@ static struct page *gfs2_sharewrite_nopage(struct vm_area_struct *area,
int alloc_required; int alloc_required;
int error; int error;
atomic_inc(&ip->i_sbd->sd_ops_vm);
error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &i_gh); error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &i_gh);
if (error) if (error)
return NULL; return NULL;
......
...@@ -319,85 +319,23 @@ struct counters_attr { ...@@ -319,85 +319,23 @@ struct counters_attr {
ssize_t (*show)(struct gfs2_sbd *, char *); ssize_t (*show)(struct gfs2_sbd *, char *);
}; };
#define COUNTERS_ATTR_GENERAL(name, fmt, val) \ #define COUNTERS_ATTR(name, fmt) \
static ssize_t name##_show(struct gfs2_sbd *sdp, char *buf) \ static ssize_t name##_show(struct gfs2_sbd *sdp, char *buf) \
{ \ { \
return sprintf(buf, fmt, val); \ return sprintf(buf, fmt, (unsigned int)atomic_read(&sdp->sd_##name)); \
} \ } \
static struct counters_attr counters_attr_##name = __ATTR_RO(name) static struct counters_attr counters_attr_##name = __ATTR_RO(name)
#define COUNTERS_ATTR_SIMPLE(name, fmt) \ COUNTERS_ATTR(glock_count, "%u\n");
COUNTERS_ATTR_GENERAL(name, fmt, sdp->sd_##name) COUNTERS_ATTR(glock_held_count, "%u\n");
COUNTERS_ATTR(inode_count, "%u\n");
#define COUNTERS_ATTR_ATOMIC(name, fmt) \ COUNTERS_ATTR(reclaimed, "%u\n");
COUNTERS_ATTR_GENERAL(name, fmt, (unsigned int)atomic_read(&sdp->sd_##name))
COUNTERS_ATTR_ATOMIC(glock_count, "%u\n");
COUNTERS_ATTR_ATOMIC(glock_held_count, "%u\n");
COUNTERS_ATTR_ATOMIC(inode_count, "%u\n");
COUNTERS_ATTR_ATOMIC(bufdata_count, "%u\n");
COUNTERS_ATTR_ATOMIC(unlinked_count, "%u\n");
COUNTERS_ATTR_ATOMIC(quota_count, "%u\n");
COUNTERS_ATTR_SIMPLE(log_num_gl, "%u\n");
COUNTERS_ATTR_SIMPLE(log_num_buf, "%u\n");
COUNTERS_ATTR_SIMPLE(log_num_revoke, "%u\n");
COUNTERS_ATTR_SIMPLE(log_num_rg, "%u\n");
COUNTERS_ATTR_SIMPLE(log_num_databuf, "%u\n");
COUNTERS_ATTR_SIMPLE(log_blks_free, "%u\n");
COUNTERS_ATTR_GENERAL(jd_blocks, "%u\n", sdp->sd_jdesc->jd_blocks);
COUNTERS_ATTR_ATOMIC(reclaim_count, "%u\n");
COUNTERS_ATTR_SIMPLE(log_wraps, "%llu\n");
COUNTERS_ATTR_ATOMIC(fh2dentry_misses, "%u\n");
COUNTERS_ATTR_ATOMIC(reclaimed, "%u\n");
COUNTERS_ATTR_ATOMIC(log_flush_incore, "%u\n");
COUNTERS_ATTR_ATOMIC(log_flush_ondisk, "%u\n");
COUNTERS_ATTR_ATOMIC(glock_nq_calls, "%u\n");
COUNTERS_ATTR_ATOMIC(glock_dq_calls, "%u\n");
COUNTERS_ATTR_ATOMIC(glock_prefetch_calls, "%u\n");
COUNTERS_ATTR_ATOMIC(lm_lock_calls, "%u\n");
COUNTERS_ATTR_ATOMIC(lm_unlock_calls, "%u\n");
COUNTERS_ATTR_ATOMIC(lm_callbacks, "%u\n");
COUNTERS_ATTR_ATOMIC(ops_address, "%u\n");
COUNTERS_ATTR_ATOMIC(ops_dentry, "%u\n");
COUNTERS_ATTR_ATOMIC(ops_export, "%u\n");
COUNTERS_ATTR_ATOMIC(ops_file, "%u\n");
COUNTERS_ATTR_ATOMIC(ops_inode, "%u\n");
COUNTERS_ATTR_ATOMIC(ops_super, "%u\n");
COUNTERS_ATTR_ATOMIC(ops_vm, "%u\n");
static struct attribute *counters_attrs[] = { static struct attribute *counters_attrs[] = {
&counters_attr_glock_count.attr, &counters_attr_glock_count.attr,
&counters_attr_glock_held_count.attr, &counters_attr_glock_held_count.attr,
&counters_attr_inode_count.attr, &counters_attr_inode_count.attr,
&counters_attr_bufdata_count.attr,
&counters_attr_unlinked_count.attr,
&counters_attr_quota_count.attr,
&counters_attr_log_num_gl.attr,
&counters_attr_log_num_buf.attr,
&counters_attr_log_num_revoke.attr,
&counters_attr_log_num_rg.attr,
&counters_attr_log_num_databuf.attr,
&counters_attr_log_blks_free.attr,
&counters_attr_jd_blocks.attr,
&counters_attr_reclaim_count.attr,
&counters_attr_log_wraps.attr,
&counters_attr_fh2dentry_misses.attr,
&counters_attr_reclaimed.attr, &counters_attr_reclaimed.attr,
&counters_attr_log_flush_incore.attr,
&counters_attr_log_flush_ondisk.attr,
&counters_attr_glock_nq_calls.attr,
&counters_attr_glock_dq_calls.attr,
&counters_attr_glock_prefetch_calls.attr,
&counters_attr_lm_lock_calls.attr,
&counters_attr_lm_unlock_calls.attr,
&counters_attr_lm_callbacks.attr,
&counters_attr_ops_address.attr,
&counters_attr_ops_dentry.attr,
&counters_attr_ops_export.attr,
&counters_attr_ops_file.attr,
&counters_attr_ops_inode.attr,
&counters_attr_ops_super.attr,
&counters_attr_ops_vm.attr,
NULL NULL
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment