aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmdebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/dlm/dlmdebug.c')
-rw-r--r--fs/ocfs2/dlm/dlmdebug.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c
index c82feb7b00b9..336a98e82eba 100644
--- a/fs/ocfs2/dlm/dlmdebug.c
+++ b/fs/ocfs2/dlm/dlmdebug.c
@@ -501,18 +501,25 @@ static struct file_operations debug_purgelist_fops = {
501static int debug_mle_print(struct dlm_ctxt *dlm, struct debug_buffer *db) 501static int debug_mle_print(struct dlm_ctxt *dlm, struct debug_buffer *db)
502{ 502{
503 struct dlm_master_list_entry *mle; 503 struct dlm_master_list_entry *mle;
504 int out = 0; 504 struct hlist_head *bucket;
505 struct hlist_node *list;
506 int i, out = 0;
505 unsigned long total = 0; 507 unsigned long total = 0;
506 508
507 out += snprintf(db->buf + out, db->len - out, 509 out += snprintf(db->buf + out, db->len - out,
508 "Dumping MLEs for Domain: %s\n", dlm->name); 510 "Dumping MLEs for Domain: %s\n", dlm->name);
509 511
510 spin_lock(&dlm->master_lock); 512 spin_lock(&dlm->master_lock);
511 list_for_each_entry(mle, &dlm->master_list, list) { 513 for (i = 0; i < DLM_HASH_BUCKETS; i++) {
512 ++total; 514 bucket = dlm_master_hash(dlm, i);
513 if (db->len - out < 200) 515 hlist_for_each(list, bucket) {
514 continue; 516 mle = hlist_entry(list, struct dlm_master_list_entry,
515 out += dump_mle(mle, db->buf + out, db->len - out); 517 master_hash_node);
518 ++total;
519 if (db->len - out < 200)
520 continue;
521 out += dump_mle(mle, db->buf + out, db->len - out);
522 }
516 } 523 }
517 spin_unlock(&dlm->master_lock); 524 spin_unlock(&dlm->master_lock);
518 525
@@ -813,12 +820,11 @@ static int debug_state_print(struct dlm_ctxt *dlm, struct debug_buffer *db)
813 /* Lists: Dirty=Empty Purge=InUse PendingASTs=Empty ... */ 820 /* Lists: Dirty=Empty Purge=InUse PendingASTs=Empty ... */
814 out += snprintf(db->buf + out, db->len - out, 821 out += snprintf(db->buf + out, db->len - out,
815 "Lists: Dirty=%s Purge=%s PendingASTs=%s " 822 "Lists: Dirty=%s Purge=%s PendingASTs=%s "
816 "PendingBASTs=%s Master=%s\n", 823 "PendingBASTs=%s\n",
817 (list_empty(&dlm->dirty_list) ? "Empty" : "InUse"), 824 (list_empty(&dlm->dirty_list) ? "Empty" : "InUse"),
818 (list_empty(&dlm->purge_list) ? "Empty" : "InUse"), 825 (list_empty(&dlm->purge_list) ? "Empty" : "InUse"),
819 (list_empty(&dlm->pending_asts) ? "Empty" : "InUse"), 826 (list_empty(&dlm->pending_asts) ? "Empty" : "InUse"),
820 (list_empty(&dlm->pending_basts) ? "Empty" : "InUse"), 827 (list_empty(&dlm->pending_basts) ? "Empty" : "InUse"));
821 (list_empty(&dlm->master_list) ? "Empty" : "InUse"));
822 828
823 /* Purge Count: xxx Refs: xxx */ 829 /* Purge Count: xxx Refs: xxx */
824 out += snprintf(db->buf + out, db->len - out, 830 out += snprintf(db->buf + out, db->len - out,