aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glock.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2006-02-23 05:11:47 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-02-23 05:11:47 -0500
commit6a6b3d018f4781f108d170f2181281a3c5589dc8 (patch)
tree471b6b8392fbcad36e62161c8f97893f97f0699e /fs/gfs2/glock.c
parent8d3b35a4af87965d1873872b21e504558f62116a (diff)
[GFS2] Patch to remove stats gathering from GFS2
Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/glock.c')
-rw-r--r--fs/gfs2/glock.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 4df78ecfeeb3..cf1dc17faf4f 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -106,8 +106,6 @@ static void glock_free(struct gfs2_glock *gl)
106 gfs2_aspace_put(aspace); 106 gfs2_aspace_put(aspace);
107 107
108 kmem_cache_free(gfs2_glock_cachep, gl); 108 kmem_cache_free(gfs2_glock_cachep, gl);
109
110 atomic_dec(&sdp->sd_glock_count);
111} 109}
112 110
113/** 111/**
@@ -316,8 +314,6 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, uint64_t number,
316 if (error) 314 if (error)
317 goto fail_aspace; 315 goto fail_aspace;
318 316
319 atomic_inc(&sdp->sd_glock_count);
320
321 write_lock(&bucket->hb_lock); 317 write_lock(&bucket->hb_lock);
322 tmp = search_bucket(bucket, &name); 318 tmp = search_bucket(bucket, &name);
323 if (tmp) { 319 if (tmp) {
@@ -836,13 +832,10 @@ static void state_change(struct gfs2_glock *gl, unsigned int new_state)
836 held2 = (new_state != LM_ST_UNLOCKED); 832 held2 = (new_state != LM_ST_UNLOCKED);
837 833
838 if (held1 != held2) { 834 if (held1 != held2) {
839 if (held2) { 835 if (held2)
840 atomic_inc(&sdp->sd_glock_held_count);
841 gfs2_glock_hold(gl); 836 gfs2_glock_hold(gl);
842 } else { 837 else
843 atomic_dec(&sdp->sd_glock_held_count);
844 gfs2_glock_put(gl); 838 gfs2_glock_put(gl);
845 }
846 } 839 }
847 840
848 gl->gl_state = new_state; 841 gl->gl_state = new_state;
@@ -994,8 +987,6 @@ void gfs2_glock_xmote_th(struct gfs2_glock *gl, unsigned int state, int flags)
994 gfs2_glock_hold(gl); 987 gfs2_glock_hold(gl);
995 gl->gl_req_bh = xmote_bh; 988 gl->gl_req_bh = xmote_bh;
996 989
997 atomic_inc(&sdp->sd_lm_lock_calls);
998
999 lck_ret = gfs2_lm_lock(sdp, gl->gl_lock, gl->gl_state, state, 990 lck_ret = gfs2_lm_lock(sdp, gl->gl_lock, gl->gl_state, state,
1000 lck_flags); 991 lck_flags);
1001 992
@@ -1087,8 +1078,6 @@ void gfs2_glock_drop_th(struct gfs2_glock *gl)
1087 gfs2_glock_hold(gl); 1078 gfs2_glock_hold(gl);
1088 gl->gl_req_bh = drop_bh; 1079 gl->gl_req_bh = drop_bh;
1089 1080
1090 atomic_inc(&sdp->sd_lm_unlock_calls);
1091
1092 ret = gfs2_lm_unlock(sdp, gl->gl_lock, gl->gl_state); 1081 ret = gfs2_lm_unlock(sdp, gl->gl_lock, gl->gl_state);
1093 1082
1094 if (gfs2_assert_withdraw(sdp, !(ret & LM_OUT_ERROR))) 1083 if (gfs2_assert_withdraw(sdp, !(ret & LM_OUT_ERROR)))
@@ -1313,8 +1302,6 @@ int gfs2_glock_nq(struct gfs2_holder *gh)
1313 struct gfs2_sbd *sdp = gl->gl_sbd; 1302 struct gfs2_sbd *sdp = gl->gl_sbd;
1314 int error = 0; 1303 int error = 0;
1315 1304
1316 atomic_inc(&sdp->sd_glock_nq_calls);
1317
1318 restart: 1305 restart:
1319 if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) { 1306 if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) {
1320 set_bit(HIF_ABORTED, &gh->gh_iflags); 1307 set_bit(HIF_ABORTED, &gh->gh_iflags);
@@ -1406,8 +1393,6 @@ void gfs2_glock_dq(struct gfs2_holder *gh)
1406 struct gfs2_sbd *sdp = gl->gl_sbd; 1393 struct gfs2_sbd *sdp = gl->gl_sbd;
1407 struct gfs2_glock_operations *glops = gl->gl_ops; 1394 struct gfs2_glock_operations *glops = gl->gl_ops;
1408 1395
1409 atomic_inc(&sdp->sd_glock_dq_calls);
1410
1411 if (gh->gh_flags & GL_SYNC) 1396 if (gh->gh_flags & GL_SYNC)
1412 set_bit(GLF_SYNC, &gl->gl_flags); 1397 set_bit(GLF_SYNC, &gl->gl_flags);
1413 1398
@@ -1469,8 +1454,6 @@ void gfs2_glock_prefetch(struct gfs2_glock *gl, unsigned int state, int flags)
1469 spin_unlock(&gl->gl_spin); 1454 spin_unlock(&gl->gl_spin);
1470 1455
1471 glops->go_xmote_th(gl, state, flags); 1456 glops->go_xmote_th(gl, state, flags);
1472
1473 atomic_inc(&gl->gl_sbd->sd_glock_prefetch_calls);
1474} 1457}
1475 1458
1476/** 1459/**
@@ -1916,8 +1899,6 @@ void gfs2_glock_cb(lm_fsdata_t *fsdata, unsigned int type, void *data)
1916{ 1899{
1917 struct gfs2_sbd *sdp = (struct gfs2_sbd *)fsdata; 1900 struct gfs2_sbd *sdp = (struct gfs2_sbd *)fsdata;
1918 1901
1919 atomic_inc(&sdp->sd_lm_callbacks);
1920
1921 switch (type) { 1902 switch (type) {
1922 case LM_CB_NEED_E: 1903 case LM_CB_NEED_E:
1923 blocking_cb(sdp, (struct lm_lockname *)data, LM_ST_UNLOCKED); 1904 blocking_cb(sdp, (struct lm_lockname *)data, LM_ST_UNLOCKED);