]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.fixes/ocfs2-dlm-tweak-mle_state-output.patch
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / ocfs2-dlm-tweak-mle_state-output.patch
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
4 Patch-mainline: 2.6.30
5 References: bnc#408304
6
7 The debugfs file, mle_state, now prints the number of largest number of mles
8 in one hash link.
9
10 Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
11 Signed-off-by: Mark Fasheh <mfasheh@suse.com>
12 ---
13 fs/ocfs2/dlm/dlmdebug.c | 7 +++++--
14 1 files changed, 5 insertions(+), 2 deletions(-)
15
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;
23 int i, out = 0;
24 - unsigned long total = 0;
25 + unsigned long total = 0, longest = 0, bktcnt;
26
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,
31 master_hash_node);
32 ++total;
33 + ++bktcnt;
34 if (db->len - out < 200)
35 continue;
36 out += dump_mle(mle, db->buf + out, db->len - out);
37 }
38 + longest = max(longest, bktcnt);
39 + bktcnt = 0;
40 }
41 spin_unlock(&dlm->master_lock);
42
43 out += snprintf(db->buf + out, db->len - out,
44 - "Total on list: %ld\n", total);
45 + "Total: %ld, Longest: %ld\n", total, longest);
46 return out;
47 }
48