aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorSunil Mushran <sunil.mushran@oracle.com>2009-02-26 18:00:46 -0500
committerMark Fasheh <mfasheh@suse.com>2009-04-03 14:39:22 -0400
commite64ff14607ac90b2f3349550a41cc8dc0c0b1324 (patch)
treee1aacbdff2ae5eef2b192212a7daf5dec0e6601c /fs/ocfs2
parent7d62a978a8c85cd82301615840d744f0d83b87e7 (diff)
ocfs2/dlm: Show the number of lockres/mles in dlm_state
This patch shows the number of lockres' and mles in the debugfs file, dlm_state. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/dlm/dlmdebug.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c
index d7decaa687e6..bf9fa270ee98 100644
--- a/fs/ocfs2/dlm/dlmdebug.c
+++ b/fs/ocfs2/dlm/dlmdebug.c
@@ -763,6 +763,8 @@ static int debug_state_print(struct dlm_ctxt *dlm, struct debug_buffer *db)
763 int out = 0; 763 int out = 0;
764 struct dlm_reco_node_data *node; 764 struct dlm_reco_node_data *node;
765 char *state; 765 char *state;
766 int cur_mles = 0, tot_mles = 0;
767 int i;
766 768
767 spin_lock(&dlm->spinlock); 769 spin_lock(&dlm->spinlock);
768 770
@@ -805,6 +807,40 @@ static int debug_state_print(struct dlm_ctxt *dlm, struct debug_buffer *db)
805 db->buf + out, db->len - out); 807 db->buf + out, db->len - out);
806 out += snprintf(db->buf + out, db->len - out, "\n"); 808 out += snprintf(db->buf + out, db->len - out, "\n");
807 809
810 /* Lock Resources: xxx (xxx) */
811 out += snprintf(db->buf + out, db->len - out,
812 "Lock Resources: %d (%d)\n",
813 atomic_read(&dlm->res_cur_count),
814 atomic_read(&dlm->res_tot_count));
815
816 for (i = 0; i < DLM_MLE_NUM_TYPES; ++i)
817 tot_mles += atomic_read(&dlm->mle_tot_count[i]);
818
819 for (i = 0; i < DLM_MLE_NUM_TYPES; ++i)
820 cur_mles += atomic_read(&dlm->mle_cur_count[i]);
821
822 /* MLEs: xxx (xxx) */
823 out += snprintf(db->buf + out, db->len - out,
824 "MLEs: %d (%d)\n", cur_mles, tot_mles);
825
826 /* Blocking: xxx (xxx) */
827 out += snprintf(db->buf + out, db->len - out,
828 " Blocking: %d (%d)\n",
829 atomic_read(&dlm->mle_cur_count[DLM_MLE_BLOCK]),
830 atomic_read(&dlm->mle_tot_count[DLM_MLE_BLOCK]));
831
832 /* Mastery: xxx (xxx) */
833 out += snprintf(db->buf + out, db->len - out,
834 " Mastery: %d (%d)\n",
835 atomic_read(&dlm->mle_cur_count[DLM_MLE_MASTER]),
836 atomic_read(&dlm->mle_tot_count[DLM_MLE_MASTER]));
837
838 /* Migration: xxx (xxx) */
839 out += snprintf(db->buf + out, db->len - out,
840 " Migration: %d (%d)\n",
841 atomic_read(&dlm->mle_cur_count[DLM_MLE_MIGRATION]),
842 atomic_read(&dlm->mle_tot_count[DLM_MLE_MIGRATION]));
843
808 /* Lists: Dirty=Empty Purge=InUse PendingASTs=Empty ... */ 844 /* Lists: Dirty=Empty Purge=InUse PendingASTs=Empty ... */
809 out += snprintf(db->buf + out, db->len - out, 845 out += snprintf(db->buf + out, db->len - out,
810 "Lists: Dirty=%s Purge=%s PendingASTs=%s " 846 "Lists: Dirty=%s Purge=%s PendingASTs=%s "