Commit 9405dccf authored by Sunil Mushran's avatar Sunil Mushran Committed by Mark Fasheh

ocfs2/dlm: Tweak mle_state output

The debugfs file, mle_state, now prints the number of largest number of mles
in one hash link.
Signed-off-by: default avatarSunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent 516b7e52
...@@ -494,7 +494,7 @@ static int debug_mle_print(struct dlm_ctxt *dlm, struct debug_buffer *db) ...@@ -494,7 +494,7 @@ static int debug_mle_print(struct dlm_ctxt *dlm, struct debug_buffer *db)
struct hlist_head *bucket; struct hlist_head *bucket;
struct hlist_node *list; struct hlist_node *list;
int i, out = 0; int i, out = 0;
unsigned long total = 0; unsigned long total = 0, longest = 0, bktcnt;
out += snprintf(db->buf + out, db->len - out, out += snprintf(db->buf + out, db->len - out,
"Dumping MLEs for Domain: %s\n", dlm->name); "Dumping MLEs for Domain: %s\n", dlm->name);
...@@ -506,15 +506,18 @@ static int debug_mle_print(struct dlm_ctxt *dlm, struct debug_buffer *db) ...@@ -506,15 +506,18 @@ static int debug_mle_print(struct dlm_ctxt *dlm, struct debug_buffer *db)
mle = hlist_entry(list, struct dlm_master_list_entry, mle = hlist_entry(list, struct dlm_master_list_entry,
master_hash_node); master_hash_node);
++total; ++total;
++bktcnt;
if (db->len - out < 200) if (db->len - out < 200)
continue; continue;
out += dump_mle(mle, db->buf + out, db->len - out); out += dump_mle(mle, db->buf + out, db->len - out);
} }
longest = max(longest, bktcnt);
bktcnt = 0;
} }
spin_unlock(&dlm->master_lock); spin_unlock(&dlm->master_lock);
out += snprintf(db->buf + out, db->len - out, out += snprintf(db->buf + out, db->len - out,
"Total on list: %ld\n", total); "Total: %ld, Longest: %ld\n", total, longest);
return out; return out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment