Lines Matching refs:dlm
350 static int debug_purgelist_print(struct dlm_ctxt *dlm, char *buf, int len) in debug_purgelist_print() argument
357 "Dumping Purgelist for Domain: %s\n", dlm->name); in debug_purgelist_print()
359 spin_lock(&dlm->spinlock); in debug_purgelist_print()
360 list_for_each_entry(res, &dlm->purge_list, purge) { in debug_purgelist_print()
372 spin_unlock(&dlm->spinlock); in debug_purgelist_print()
381 struct dlm_ctxt *dlm = inode->i_private; in debug_purgelist_open() local
388 i_size_write(inode, debug_purgelist_print(dlm, buf, PAGE_SIZE - 1)); in debug_purgelist_open()
406 static int debug_mle_print(struct dlm_ctxt *dlm, char *buf, int len) in debug_mle_print() argument
414 "Dumping MLEs for Domain: %s\n", dlm->name); in debug_mle_print()
416 spin_lock(&dlm->master_lock); in debug_mle_print()
418 bucket = dlm_master_hash(dlm, i); in debug_mle_print()
429 spin_unlock(&dlm->master_lock); in debug_mle_print()
438 struct dlm_ctxt *dlm = inode->i_private; in debug_mle_open() local
445 i_size_write(inode, debug_mle_print(dlm, buf, PAGE_SIZE - 1)); in debug_mle_open()
544 struct dlm_ctxt *dlm = dl->dl_ctxt; in lockres_seq_start() local
549 spin_lock(&dlm->track_lock); in lockres_seq_start()
553 track_list = &dlm->tracking_list; in lockres_seq_start()
556 spin_unlock(&dlm->track_lock); in lockres_seq_start()
562 if (&res->tracking == &dlm->tracking_list) in lockres_seq_start()
568 spin_unlock(&dlm->track_lock); in lockres_seq_start()
614 struct dlm_ctxt *dlm = inode->i_private; in debug_lockres_open() local
629 dlm_grab(dlm); in debug_lockres_open()
630 dl->dl_ctxt = dlm; in debug_lockres_open()
662 static int debug_state_print(struct dlm_ctxt *dlm, char *buf, int len) in debug_state_print() argument
670 spin_lock(&dlm->spinlock); in debug_state_print()
672 switch (dlm->dlm_state) { in debug_state_print()
688 dlm->name, dlm->key, dlm->dlm_locking_proto.pv_major, in debug_state_print()
689 dlm->dlm_locking_proto.pv_minor); in debug_state_print()
694 task_pid_nr(dlm->dlm_thread_task), dlm->node_num, state); in debug_state_print()
699 dlm->num_joins, dlm->joining_node); in debug_state_print()
703 out += stringify_nodemap(dlm->domain_map, O2NM_MAX_NODES, in debug_state_print()
709 out += stringify_nodemap(dlm->exit_domain_map, O2NM_MAX_NODES, in debug_state_print()
715 out += stringify_nodemap(dlm->live_nodes_map, O2NM_MAX_NODES, in debug_state_print()
722 atomic_read(&dlm->res_cur_count), in debug_state_print()
723 atomic_read(&dlm->res_tot_count)); in debug_state_print()
726 tot_mles += atomic_read(&dlm->mle_tot_count[i]); in debug_state_print()
729 cur_mles += atomic_read(&dlm->mle_cur_count[i]); in debug_state_print()
738 atomic_read(&dlm->mle_cur_count[DLM_MLE_BLOCK]), in debug_state_print()
739 atomic_read(&dlm->mle_tot_count[DLM_MLE_BLOCK])); in debug_state_print()
744 atomic_read(&dlm->mle_cur_count[DLM_MLE_MASTER]), in debug_state_print()
745 atomic_read(&dlm->mle_tot_count[DLM_MLE_MASTER])); in debug_state_print()
750 atomic_read(&dlm->mle_cur_count[DLM_MLE_MIGRATION]), in debug_state_print()
751 atomic_read(&dlm->mle_tot_count[DLM_MLE_MIGRATION])); in debug_state_print()
757 (list_empty(&dlm->dirty_list) ? "Empty" : "InUse"), in debug_state_print()
758 (list_empty(&dlm->purge_list) ? "Empty" : "InUse"), in debug_state_print()
759 (list_empty(&dlm->pending_asts) ? "Empty" : "InUse"), in debug_state_print()
760 (list_empty(&dlm->pending_basts) ? "Empty" : "InUse")); in debug_state_print()
764 "Purge Count: %d Refs: %d\n", dlm->purge_count, in debug_state_print()
765 kref_read(&dlm->dlm_refs)); in debug_state_print()
769 "Dead Node: %d\n", dlm->reco.dead_node); in debug_state_print()
772 if (dlm->reco.state == DLM_RECO_STATE_ACTIVE) in debug_state_print()
780 task_pid_nr(dlm->dlm_reco_thread_task), in debug_state_print()
781 dlm->reco.new_master, state); in debug_state_print()
785 out += stringify_nodemap(dlm->recovery_map, O2NM_MAX_NODES, in debug_state_print()
791 list_for_each_entry(node, &dlm->reco.node_data, list) { in debug_state_print()
822 spin_unlock(&dlm->spinlock); in debug_state_print()
829 struct dlm_ctxt *dlm = inode->i_private; in debug_state_open() local
836 i_size_write(inode, debug_state_print(dlm, buf, PAGE_SIZE - 1)); in debug_state_open()
854 void dlm_debug_init(struct dlm_ctxt *dlm) in dlm_debug_init() argument
858 dlm->dlm_debugfs_subroot, dlm, &debug_state_fops); in dlm_debug_init()
862 dlm->dlm_debugfs_subroot, dlm, &debug_lockres_fops); in dlm_debug_init()
866 dlm->dlm_debugfs_subroot, dlm, &debug_mle_fops); in dlm_debug_init()
870 dlm->dlm_debugfs_subroot, dlm, in dlm_debug_init()
875 void dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) in dlm_create_debugfs_subroot() argument
877 dlm->dlm_debugfs_subroot = debugfs_create_dir(dlm->name, in dlm_create_debugfs_subroot()
881 void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) in dlm_destroy_debugfs_subroot() argument
883 debugfs_remove_recursive(dlm->dlm_debugfs_subroot); in dlm_destroy_debugfs_subroot()