Lines Matching refs:dlm

365 static int debug_purgelist_print(struct dlm_ctxt *dlm, char *buf, int len)  in debug_purgelist_print()  argument
372 "Dumping Purgelist for Domain: %s\n", dlm->name); in debug_purgelist_print()
374 spin_lock(&dlm->spinlock); in debug_purgelist_print()
375 list_for_each_entry(res, &dlm->purge_list, purge) { in debug_purgelist_print()
387 spin_unlock(&dlm->spinlock); in debug_purgelist_print()
396 struct dlm_ctxt *dlm = inode->i_private; in debug_purgelist_open() local
403 i_size_write(inode, debug_purgelist_print(dlm, buf, PAGE_SIZE - 1)); in debug_purgelist_open()
421 static int debug_mle_print(struct dlm_ctxt *dlm, char *buf, int len) in debug_mle_print() argument
429 "Dumping MLEs for Domain: %s\n", dlm->name); in debug_mle_print()
431 spin_lock(&dlm->master_lock); in debug_mle_print()
433 bucket = dlm_master_hash(dlm, i); in debug_mle_print()
444 spin_unlock(&dlm->master_lock); in debug_mle_print()
453 struct dlm_ctxt *dlm = inode->i_private; in debug_mle_open() local
460 i_size_write(inode, debug_mle_print(dlm, buf, PAGE_SIZE - 1)); in debug_mle_open()
559 struct dlm_ctxt *dlm = dl->dl_ctxt; in lockres_seq_start() local
564 spin_lock(&dlm->track_lock); in lockres_seq_start()
568 track_list = &dlm->tracking_list; in lockres_seq_start()
571 spin_unlock(&dlm->track_lock); in lockres_seq_start()
577 if (&res->tracking == &dlm->tracking_list) in lockres_seq_start()
583 spin_unlock(&dlm->track_lock); in lockres_seq_start()
629 struct dlm_ctxt *dlm = inode->i_private; in debug_lockres_open() local
644 dlm_grab(dlm); in debug_lockres_open()
645 dl->dl_ctxt = dlm; in debug_lockres_open()
677 static int debug_state_print(struct dlm_ctxt *dlm, char *buf, int len) in debug_state_print() argument
685 spin_lock(&dlm->spinlock); in debug_state_print()
687 switch (dlm->dlm_state) { in debug_state_print()
703 dlm->name, dlm->key, dlm->dlm_locking_proto.pv_major, in debug_state_print()
704 dlm->dlm_locking_proto.pv_minor); in debug_state_print()
709 task_pid_nr(dlm->dlm_thread_task), dlm->node_num, state); in debug_state_print()
714 dlm->num_joins, dlm->joining_node); in debug_state_print()
718 out += stringify_nodemap(dlm->domain_map, O2NM_MAX_NODES, in debug_state_print()
724 out += stringify_nodemap(dlm->exit_domain_map, O2NM_MAX_NODES, in debug_state_print()
730 out += stringify_nodemap(dlm->live_nodes_map, O2NM_MAX_NODES, in debug_state_print()
737 atomic_read(&dlm->res_cur_count), in debug_state_print()
738 atomic_read(&dlm->res_tot_count)); in debug_state_print()
741 tot_mles += atomic_read(&dlm->mle_tot_count[i]); in debug_state_print()
744 cur_mles += atomic_read(&dlm->mle_cur_count[i]); in debug_state_print()
753 atomic_read(&dlm->mle_cur_count[DLM_MLE_BLOCK]), in debug_state_print()
754 atomic_read(&dlm->mle_tot_count[DLM_MLE_BLOCK])); in debug_state_print()
759 atomic_read(&dlm->mle_cur_count[DLM_MLE_MASTER]), in debug_state_print()
760 atomic_read(&dlm->mle_tot_count[DLM_MLE_MASTER])); in debug_state_print()
765 atomic_read(&dlm->mle_cur_count[DLM_MLE_MIGRATION]), in debug_state_print()
766 atomic_read(&dlm->mle_tot_count[DLM_MLE_MIGRATION])); in debug_state_print()
772 (list_empty(&dlm->dirty_list) ? "Empty" : "InUse"), in debug_state_print()
773 (list_empty(&dlm->purge_list) ? "Empty" : "InUse"), in debug_state_print()
774 (list_empty(&dlm->pending_asts) ? "Empty" : "InUse"), in debug_state_print()
775 (list_empty(&dlm->pending_basts) ? "Empty" : "InUse")); in debug_state_print()
779 "Purge Count: %d Refs: %d\n", dlm->purge_count, in debug_state_print()
780 kref_read(&dlm->dlm_refs)); in debug_state_print()
784 "Dead Node: %d\n", dlm->reco.dead_node); in debug_state_print()
787 if (dlm->reco.state == DLM_RECO_STATE_ACTIVE) in debug_state_print()
795 task_pid_nr(dlm->dlm_reco_thread_task), in debug_state_print()
796 dlm->reco.new_master, state); in debug_state_print()
800 out += stringify_nodemap(dlm->recovery_map, O2NM_MAX_NODES, in debug_state_print()
806 list_for_each_entry(node, &dlm->reco.node_data, list) { in debug_state_print()
837 spin_unlock(&dlm->spinlock); in debug_state_print()
844 struct dlm_ctxt *dlm = inode->i_private; in debug_state_open() local
851 i_size_write(inode, debug_state_print(dlm, buf, PAGE_SIZE - 1)); in debug_state_open()
869 int dlm_debug_init(struct dlm_ctxt *dlm) in dlm_debug_init() argument
871 struct dlm_debug_ctxt *dc = dlm->dlm_debug_ctxt; in dlm_debug_init()
876 dlm->dlm_debugfs_subroot, in dlm_debug_init()
877 dlm, &debug_state_fops); in dlm_debug_init()
887 dlm->dlm_debugfs_subroot, in dlm_debug_init()
888 dlm, &debug_lockres_fops); in dlm_debug_init()
897 dlm->dlm_debugfs_subroot, in dlm_debug_init()
898 dlm, &debug_mle_fops); in dlm_debug_init()
908 dlm->dlm_debugfs_subroot, in dlm_debug_init()
909 dlm, &debug_purgelist_fops); in dlm_debug_init()
921 void dlm_debug_shutdown(struct dlm_ctxt *dlm) in dlm_debug_shutdown() argument
923 struct dlm_debug_ctxt *dc = dlm->dlm_debug_ctxt; in dlm_debug_shutdown()
936 int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) in dlm_create_debugfs_subroot() argument
938 dlm->dlm_debugfs_subroot = debugfs_create_dir(dlm->name, in dlm_create_debugfs_subroot()
940 if (!dlm->dlm_debugfs_subroot) { in dlm_create_debugfs_subroot()
945 dlm->dlm_debug_ctxt = kzalloc(sizeof(struct dlm_debug_ctxt), in dlm_create_debugfs_subroot()
947 if (!dlm->dlm_debug_ctxt) { in dlm_create_debugfs_subroot()
954 dlm_destroy_debugfs_subroot(dlm); in dlm_create_debugfs_subroot()
958 void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) in dlm_destroy_debugfs_subroot() argument
960 debugfs_remove(dlm->dlm_debugfs_subroot); in dlm_destroy_debugfs_subroot()