aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ocfs2/dlm/dlmdebug.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c
index bdf1c7817bb5..df52f706f669 100644
--- a/fs/ocfs2/dlm/dlmdebug.c
+++ b/fs/ocfs2/dlm/dlmdebug.c
@@ -494,7 +494,7 @@ static int debug_mle_print(struct dlm_ctxt *dlm, struct debug_buffer *db)
494 struct hlist_head *bucket; 494 struct hlist_head *bucket;
495 struct hlist_node *list; 495 struct hlist_node *list;
496 int i, out = 0; 496 int i, out = 0;
497 unsigned long total = 0; 497 unsigned long total = 0, longest = 0, bktcnt;
498 498
499 out += snprintf(db->buf + out, db->len - out, 499 out += snprintf(db->buf + out, db->len - out,
500 "Dumping MLEs for Domain: %s\n", dlm->name); 500 "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 mle = hlist_entry(list, struct dlm_master_list_entry, 506 mle = hlist_entry(list, struct dlm_master_list_entry,
507 master_hash_node); 507 master_hash_node);
508 ++total; 508 ++total;
509 ++bktcnt;
509 if (db->len - out < 200) 510 if (db->len - out < 200)
510 continue; 511 continue;
511 out += dump_mle(mle, db->buf + out, db->len - out); 512 out += dump_mle(mle, db->buf + out, db->len - out);
512 } 513 }
514 longest = max(longest, bktcnt);
515 bktcnt = 0;
513 } 516 }
514 spin_unlock(&dlm->master_lock); 517 spin_unlock(&dlm->master_lock);
515 518
516 out += snprintf(db->buf + out, db->len - out, 519 out += snprintf(db->buf + out, db->len - out,
517 "Total on list: %ld\n", total); 520 "Total: %ld, Longest: %ld\n", total, longest);
518 return out; 521 return out;
519} 522}
520 523