]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.fixes/ocfs2-dlm-show-the-number-of-lockres-mles-in-dlm_st.patch
Move xen patchset to new version's subdir.
[ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / ocfs2-dlm-show-the-number-of-lockres-mles-in-dlm_st.patch
CommitLineData
00e5a55c
BS
1From: Sunil Mushran <sunil.mushran@oracle.com>
2Date: Thu, 26 Feb 2009 15:00:46 -0800
3Subject: ocfs2/dlm: Show the number of lockres/mles in dlm_state
4Patch-mainline: 2.6.30
5References: bnc#408304
6
7This patch shows the number of lockres' and mles in the debugfs file, dlm_state.
8
9Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
10Signed-off-by: Mark Fasheh <mfasheh@suse.com>
11---
12 fs/ocfs2/dlm/dlmdebug.c | 36 ++++++++++++++++++++++++++++++++++++
13 1 files changed, 36 insertions(+), 0 deletions(-)
14
15Index: linux-2.6.27-sle11_ocfs2_update/fs/ocfs2/dlm/dlmdebug.c
16===================================================================
17--- linux-2.6.27-sle11_ocfs2_update.orig/fs/ocfs2/dlm/dlmdebug.c
18+++ linux-2.6.27-sle11_ocfs2_update/fs/ocfs2/dlm/dlmdebug.c
19@@ -763,6 +763,8 @@ static int debug_state_print(struct dlm_
20 int out = 0;
21 struct dlm_reco_node_data *node;
22 char *state;
23+ int cur_mles = 0, tot_mles = 0;
24+ int i;
25
26 spin_lock(&dlm->spinlock);
27
28@@ -805,6 +807,40 @@ static int debug_state_print(struct dlm_
29 db->buf + out, db->len - out);
30 out += snprintf(db->buf + out, db->len - out, "\n");
31
32+ /* Lock Resources: xxx (xxx) */
33+ out += snprintf(db->buf + out, db->len - out,
34+ "Lock Resources: %d (%d)\n",
35+ atomic_read(&dlm->res_cur_count),
36+ atomic_read(&dlm->res_tot_count));
37+
38+ for (i = 0; i < DLM_MLE_NUM_TYPES; ++i)
39+ tot_mles += atomic_read(&dlm->mle_tot_count[i]);
40+
41+ for (i = 0; i < DLM_MLE_NUM_TYPES; ++i)
42+ cur_mles += atomic_read(&dlm->mle_cur_count[i]);
43+
44+ /* MLEs: xxx (xxx) */
45+ out += snprintf(db->buf + out, db->len - out,
46+ "MLEs: %d (%d)\n", cur_mles, tot_mles);
47+
48+ /* Blocking: xxx (xxx) */
49+ out += snprintf(db->buf + out, db->len - out,
50+ " Blocking: %d (%d)\n",
51+ atomic_read(&dlm->mle_cur_count[DLM_MLE_BLOCK]),
52+ atomic_read(&dlm->mle_tot_count[DLM_MLE_BLOCK]));
53+
54+ /* Mastery: xxx (xxx) */
55+ out += snprintf(db->buf + out, db->len - out,
56+ " Mastery: %d (%d)\n",
57+ atomic_read(&dlm->mle_cur_count[DLM_MLE_MASTER]),
58+ atomic_read(&dlm->mle_tot_count[DLM_MLE_MASTER]));
59+
60+ /* Migration: xxx (xxx) */
61+ out += snprintf(db->buf + out, db->len - out,
62+ " Migration: %d (%d)\n",
63+ atomic_read(&dlm->mle_cur_count[DLM_MLE_MIGRATION]),
64+ atomic_read(&dlm->mle_tot_count[DLM_MLE_MIGRATION]));
65+
66 /* Lists: Dirty=Empty Purge=InUse PendingASTs=Empty ... */
67 out += snprintf(db->buf + out, db->len - out,
68 "Lists: Dirty=%s Purge=%s PendingASTs=%s "