Lines Matching refs:dlm

385 static int debug_purgelist_print(struct dlm_ctxt *dlm, char *buf, int len)  in debug_purgelist_print()  argument
392 "Dumping Purgelist for Domain: %s\n", dlm->name); in debug_purgelist_print()
394 spin_lock(&dlm->spinlock); in debug_purgelist_print()
395 list_for_each_entry(res, &dlm->purge_list, purge) { in debug_purgelist_print()
407 spin_unlock(&dlm->spinlock); in debug_purgelist_print()
416 struct dlm_ctxt *dlm = inode->i_private; in debug_purgelist_open() local
423 i_size_write(inode, debug_purgelist_print(dlm, buf, PAGE_SIZE - 1)); in debug_purgelist_open()
441 static int debug_mle_print(struct dlm_ctxt *dlm, char *buf, int len) in debug_mle_print() argument
449 "Dumping MLEs for Domain: %s\n", dlm->name); in debug_mle_print()
451 spin_lock(&dlm->master_lock); in debug_mle_print()
453 bucket = dlm_master_hash(dlm, i); in debug_mle_print()
464 spin_unlock(&dlm->master_lock); in debug_mle_print()
473 struct dlm_ctxt *dlm = inode->i_private; in debug_mle_open() local
480 i_size_write(inode, debug_mle_print(dlm, buf, PAGE_SIZE - 1)); in debug_mle_open()
579 struct dlm_ctxt *dlm = dl->dl_ctxt; in lockres_seq_start() local
584 spin_lock(&dlm->track_lock); in lockres_seq_start()
588 track_list = &dlm->tracking_list; in lockres_seq_start()
591 spin_unlock(&dlm->track_lock); in lockres_seq_start()
597 if (&res->tracking == &dlm->tracking_list) in lockres_seq_start()
603 spin_unlock(&dlm->track_lock); in lockres_seq_start()
649 struct dlm_ctxt *dlm = inode->i_private; in debug_lockres_open() local
664 dlm_grab(dlm); in debug_lockres_open()
665 dl->dl_ctxt = dlm; in debug_lockres_open()
697 static int debug_state_print(struct dlm_ctxt *dlm, char *buf, int len) in debug_state_print() argument
705 spin_lock(&dlm->spinlock); in debug_state_print()
707 switch (dlm->dlm_state) { in debug_state_print()
723 dlm->name, dlm->key, dlm->dlm_locking_proto.pv_major, in debug_state_print()
724 dlm->dlm_locking_proto.pv_minor); in debug_state_print()
729 task_pid_nr(dlm->dlm_thread_task), dlm->node_num, state); in debug_state_print()
734 dlm->num_joins, dlm->joining_node); in debug_state_print()
738 out += stringify_nodemap(dlm->domain_map, O2NM_MAX_NODES, in debug_state_print()
744 out += stringify_nodemap(dlm->exit_domain_map, O2NM_MAX_NODES, in debug_state_print()
750 out += stringify_nodemap(dlm->live_nodes_map, O2NM_MAX_NODES, in debug_state_print()
757 atomic_read(&dlm->res_cur_count), in debug_state_print()
758 atomic_read(&dlm->res_tot_count)); in debug_state_print()
761 tot_mles += atomic_read(&dlm->mle_tot_count[i]); in debug_state_print()
764 cur_mles += atomic_read(&dlm->mle_cur_count[i]); in debug_state_print()
773 atomic_read(&dlm->mle_cur_count[DLM_MLE_BLOCK]), in debug_state_print()
774 atomic_read(&dlm->mle_tot_count[DLM_MLE_BLOCK])); in debug_state_print()
779 atomic_read(&dlm->mle_cur_count[DLM_MLE_MASTER]), in debug_state_print()
780 atomic_read(&dlm->mle_tot_count[DLM_MLE_MASTER])); in debug_state_print()
785 atomic_read(&dlm->mle_cur_count[DLM_MLE_MIGRATION]), in debug_state_print()
786 atomic_read(&dlm->mle_tot_count[DLM_MLE_MIGRATION])); in debug_state_print()
792 (list_empty(&dlm->dirty_list) ? "Empty" : "InUse"), in debug_state_print()
793 (list_empty(&dlm->purge_list) ? "Empty" : "InUse"), in debug_state_print()
794 (list_empty(&dlm->pending_asts) ? "Empty" : "InUse"), in debug_state_print()
795 (list_empty(&dlm->pending_basts) ? "Empty" : "InUse")); in debug_state_print()
799 "Purge Count: %d Refs: %d\n", dlm->purge_count, in debug_state_print()
800 atomic_read(&dlm->dlm_refs.refcount)); in debug_state_print()
804 "Dead Node: %d\n", dlm->reco.dead_node); in debug_state_print()
807 if (dlm->reco.state == DLM_RECO_STATE_ACTIVE) in debug_state_print()
815 task_pid_nr(dlm->dlm_reco_thread_task), in debug_state_print()
816 dlm->reco.new_master, state); in debug_state_print()
820 out += stringify_nodemap(dlm->recovery_map, O2NM_MAX_NODES, in debug_state_print()
826 list_for_each_entry(node, &dlm->reco.node_data, list) { in debug_state_print()
857 spin_unlock(&dlm->spinlock); in debug_state_print()
864 struct dlm_ctxt *dlm = inode->i_private; in debug_state_open() local
871 i_size_write(inode, debug_state_print(dlm, buf, PAGE_SIZE - 1)); in debug_state_open()
889 int dlm_debug_init(struct dlm_ctxt *dlm) in dlm_debug_init() argument
891 struct dlm_debug_ctxt *dc = dlm->dlm_debug_ctxt; in dlm_debug_init()
896 dlm->dlm_debugfs_subroot, in dlm_debug_init()
897 dlm, &debug_state_fops); in dlm_debug_init()
907 dlm->dlm_debugfs_subroot, in dlm_debug_init()
908 dlm, &debug_lockres_fops); in dlm_debug_init()
917 dlm->dlm_debugfs_subroot, in dlm_debug_init()
918 dlm, &debug_mle_fops); in dlm_debug_init()
928 dlm->dlm_debugfs_subroot, in dlm_debug_init()
929 dlm, &debug_purgelist_fops); in dlm_debug_init()
939 dlm_debug_shutdown(dlm); in dlm_debug_init()
943 void dlm_debug_shutdown(struct dlm_ctxt *dlm) in dlm_debug_shutdown() argument
945 struct dlm_debug_ctxt *dc = dlm->dlm_debug_ctxt; in dlm_debug_shutdown()
957 int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) in dlm_create_debugfs_subroot() argument
959 dlm->dlm_debugfs_subroot = debugfs_create_dir(dlm->name, in dlm_create_debugfs_subroot()
961 if (!dlm->dlm_debugfs_subroot) { in dlm_create_debugfs_subroot()
966 dlm->dlm_debug_ctxt = kzalloc(sizeof(struct dlm_debug_ctxt), in dlm_create_debugfs_subroot()
968 if (!dlm->dlm_debug_ctxt) { in dlm_create_debugfs_subroot()
972 kref_init(&dlm->dlm_debug_ctxt->debug_refcnt); in dlm_create_debugfs_subroot()
976 dlm_destroy_debugfs_subroot(dlm); in dlm_create_debugfs_subroot()
980 void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) in dlm_destroy_debugfs_subroot() argument
982 debugfs_remove(dlm->dlm_debugfs_subroot); in dlm_destroy_debugfs_subroot()