Lines Matching refs:dlm
348 static int debug_purgelist_print(struct dlm_ctxt *dlm, char *buf, int len) in debug_purgelist_print() argument
355 "Dumping Purgelist for Domain: %s\n", dlm->name); in debug_purgelist_print()
357 spin_lock(&dlm->spinlock); in debug_purgelist_print()
358 list_for_each_entry(res, &dlm->purge_list, purge) { in debug_purgelist_print()
370 spin_unlock(&dlm->spinlock); in debug_purgelist_print()
379 struct dlm_ctxt *dlm = inode->i_private; in debug_purgelist_open() local
386 i_size_write(inode, debug_purgelist_print(dlm, buf, PAGE_SIZE - 1)); in debug_purgelist_open()
404 static int debug_mle_print(struct dlm_ctxt *dlm, char *buf, int len) in debug_mle_print() argument
412 "Dumping MLEs for Domain: %s\n", dlm->name); in debug_mle_print()
414 spin_lock(&dlm->master_lock); in debug_mle_print()
416 bucket = dlm_master_hash(dlm, i); in debug_mle_print()
427 spin_unlock(&dlm->master_lock); in debug_mle_print()
436 struct dlm_ctxt *dlm = inode->i_private; in debug_mle_open() local
443 i_size_write(inode, debug_mle_print(dlm, buf, PAGE_SIZE - 1)); in debug_mle_open()
542 struct dlm_ctxt *dlm = dl->dl_ctxt; in lockres_seq_start() local
547 spin_lock(&dlm->track_lock); in lockres_seq_start()
551 track_list = &dlm->tracking_list; in lockres_seq_start()
554 spin_unlock(&dlm->track_lock); in lockres_seq_start()
560 if (&iter->tracking != &dlm->tracking_list) { in lockres_seq_start()
566 spin_unlock(&dlm->track_lock); in lockres_seq_start()
612 struct dlm_ctxt *dlm = inode->i_private; in debug_lockres_open() local
627 dlm_grab(dlm); in debug_lockres_open()
628 dl->dl_ctxt = dlm; in debug_lockres_open()
660 static int debug_state_print(struct dlm_ctxt *dlm, char *buf, int len) in debug_state_print() argument
668 spin_lock(&dlm->spinlock); in debug_state_print()
670 switch (dlm->dlm_state) { in debug_state_print()
686 dlm->name, dlm->key, dlm->dlm_locking_proto.pv_major, in debug_state_print()
687 dlm->dlm_locking_proto.pv_minor); in debug_state_print()
692 task_pid_nr(dlm->dlm_thread_task), dlm->node_num, state); in debug_state_print()
697 dlm->num_joins, dlm->joining_node); in debug_state_print()
701 out += stringify_nodemap(dlm->domain_map, O2NM_MAX_NODES, in debug_state_print()
707 out += stringify_nodemap(dlm->exit_domain_map, O2NM_MAX_NODES, in debug_state_print()
713 out += stringify_nodemap(dlm->live_nodes_map, O2NM_MAX_NODES, in debug_state_print()
720 atomic_read(&dlm->res_cur_count), in debug_state_print()
721 atomic_read(&dlm->res_tot_count)); in debug_state_print()
724 tot_mles += atomic_read(&dlm->mle_tot_count[i]); in debug_state_print()
727 cur_mles += atomic_read(&dlm->mle_cur_count[i]); in debug_state_print()
736 atomic_read(&dlm->mle_cur_count[DLM_MLE_BLOCK]), in debug_state_print()
737 atomic_read(&dlm->mle_tot_count[DLM_MLE_BLOCK])); in debug_state_print()
742 atomic_read(&dlm->mle_cur_count[DLM_MLE_MASTER]), in debug_state_print()
743 atomic_read(&dlm->mle_tot_count[DLM_MLE_MASTER])); in debug_state_print()
748 atomic_read(&dlm->mle_cur_count[DLM_MLE_MIGRATION]), in debug_state_print()
749 atomic_read(&dlm->mle_tot_count[DLM_MLE_MIGRATION])); in debug_state_print()
755 (list_empty(&dlm->dirty_list) ? "Empty" : "InUse"), in debug_state_print()
756 (list_empty(&dlm->purge_list) ? "Empty" : "InUse"), in debug_state_print()
757 (list_empty(&dlm->pending_asts) ? "Empty" : "InUse"), in debug_state_print()
758 (list_empty(&dlm->pending_basts) ? "Empty" : "InUse")); in debug_state_print()
762 "Purge Count: %d Refs: %d\n", dlm->purge_count, in debug_state_print()
763 kref_read(&dlm->dlm_refs)); in debug_state_print()
767 "Dead Node: %d\n", dlm->reco.dead_node); in debug_state_print()
770 if (dlm->reco.state == DLM_RECO_STATE_ACTIVE) in debug_state_print()
778 task_pid_nr(dlm->dlm_reco_thread_task), in debug_state_print()
779 dlm->reco.new_master, state); in debug_state_print()
783 out += stringify_nodemap(dlm->recovery_map, O2NM_MAX_NODES, in debug_state_print()
789 list_for_each_entry(node, &dlm->reco.node_data, list) { in debug_state_print()
820 spin_unlock(&dlm->spinlock); in debug_state_print()
827 struct dlm_ctxt *dlm = inode->i_private; in debug_state_open() local
834 i_size_write(inode, debug_state_print(dlm, buf, PAGE_SIZE - 1)); in debug_state_open()
852 void dlm_debug_init(struct dlm_ctxt *dlm) in dlm_debug_init() argument
856 dlm->dlm_debugfs_subroot, dlm, &debug_state_fops); in dlm_debug_init()
860 dlm->dlm_debugfs_subroot, dlm, &debug_lockres_fops); in dlm_debug_init()
864 dlm->dlm_debugfs_subroot, dlm, &debug_mle_fops); in dlm_debug_init()
868 dlm->dlm_debugfs_subroot, dlm, in dlm_debug_init()
873 void dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) in dlm_create_debugfs_subroot() argument
875 dlm->dlm_debugfs_subroot = debugfs_create_dir(dlm->name, in dlm_create_debugfs_subroot()
879 void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) in dlm_destroy_debugfs_subroot() argument
881 debugfs_remove_recursive(dlm->dlm_debugfs_subroot); in dlm_destroy_debugfs_subroot()