1 From: Sunil Mushran <sunil.mushran@oracle.com>
2 Date: Thu, 26 Feb 2009 15:00:49 -0800
3 Subject: ocfs2/dlm: Tweak mle_state output
7 The debugfs file, mle_state, now prints the number of largest number of mles
10 Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
11 Signed-off-by: Mark Fasheh <mfasheh@suse.com>
13 fs/ocfs2/dlm/dlmdebug.c | 7 +++++--
14 1 files changed, 5 insertions(+), 2 deletions(-)
16 Index: linux-2.6.27-sle11_ocfs2_update2/fs/ocfs2/dlm/dlmdebug.c
17 ===================================================================
18 --- linux-2.6.27-sle11_ocfs2_update2.orig/fs/ocfs2/dlm/dlmdebug.c
19 +++ linux-2.6.27-sle11_ocfs2_update2/fs/ocfs2/dlm/dlmdebug.c
20 @@ -494,7 +494,7 @@ static int debug_mle_print(struct dlm_ct
21 struct hlist_head *bucket;
22 struct hlist_node *list;
24 - unsigned long total = 0;
25 + unsigned long total = 0, longest = 0, bktcnt;
27 out += snprintf(db->buf + out, db->len - out,
28 "Dumping MLEs for Domain: %s\n", dlm->name);
29 @@ -506,15 +506,18 @@ static int debug_mle_print(struct dlm_ct
30 mle = hlist_entry(list, struct dlm_master_list_entry,
34 if (db->len - out < 200)
36 out += dump_mle(mle, db->buf + out, db->len - out);
38 + longest = max(longest, bktcnt);
41 spin_unlock(&dlm->master_lock);
43 out += snprintf(db->buf + out, db->len - out,
44 - "Total on list: %ld\n", total);
45 + "Total: %ld, Longest: %ld\n", total, longest);