dlm 126 arch/powerpc/kernel/udbg_16550.c unsigned int dll, dlm, divisor, prescaler, speed; dlm 136 arch/powerpc/kernel/udbg_16550.c dlm = udbg_uart_in(UART_DLM); dlm 137 arch/powerpc/kernel/udbg_16550.c divisor = dlm << 8 | dll; dlm 185 drivers/media/platform/vsp1/vsp1_dl.c struct vsp1_dl_manager *dlm; dlm 532 drivers/media/platform/vsp1/vsp1_dl.c struct vsp1_dl_manager *dlm = dl->dlm; dlm 537 drivers/media/platform/vsp1/vsp1_dl.c dl->pre_cmd = vsp1_dl_ext_cmd_get(dlm->cmdpool); dlm 546 drivers/media/platform/vsp1/vsp1_dl.c static struct vsp1_dl_list *vsp1_dl_list_alloc(struct vsp1_dl_manager *dlm) dlm 556 drivers/media/platform/vsp1/vsp1_dl.c dl->dlm = dlm; dlm 559 drivers/media/platform/vsp1/vsp1_dl.c dl->body0 = vsp1_dl_body_get(dlm->pool); dlm 602 drivers/media/platform/vsp1/vsp1_dl.c struct vsp1_dl_list *vsp1_dl_list_get(struct vsp1_dl_manager *dlm) dlm 607 drivers/media/platform/vsp1/vsp1_dl.c spin_lock_irqsave(&dlm->lock, flags); dlm 609 drivers/media/platform/vsp1/vsp1_dl.c if (!list_empty(&dlm->free)) { dlm 610 drivers/media/platform/vsp1/vsp1_dl.c dl = list_first_entry(&dlm->free, struct vsp1_dl_list, list); dlm 620 drivers/media/platform/vsp1/vsp1_dl.c spin_unlock_irqrestore(&dlm->lock, flags); dlm 658 drivers/media/platform/vsp1/vsp1_dl.c list_add_tail(&dl->list, &dl->dlm->free); dlm 677 drivers/media/platform/vsp1/vsp1_dl.c spin_lock_irqsave(&dl->dlm->lock, flags); dlm 679 drivers/media/platform/vsp1/vsp1_dl.c spin_unlock_irqrestore(&dl->dlm->lock, flags); dlm 751 drivers/media/platform/vsp1/vsp1_dl.c struct vsp1_dl_manager *dlm = dl->dlm; dlm 784 drivers/media/platform/vsp1/vsp1_dl.c if (!dlm->singleshot || is_last) dlm 793 drivers/media/platform/vsp1/vsp1_dl.c if (!dlm->singleshot || !is_last) dlm 804 drivers/media/platform/vsp1/vsp1_dl.c } else if (!dlm->singleshot) { dlm 835 drivers/media/platform/vsp1/vsp1_dl.c static bool vsp1_dl_list_hw_update_pending(struct vsp1_dl_manager *dlm) dlm 837 drivers/media/platform/vsp1/vsp1_dl.c struct vsp1_device *vsp1 = dlm->vsp1; dlm 839 drivers/media/platform/vsp1/vsp1_dl.c if (!dlm->queued) dlm 846 drivers/media/platform/vsp1/vsp1_dl.c return !!(vsp1_read(vsp1, VI6_CMD(dlm->index)) & VI6_CMD_UPDHDR); dlm 851 drivers/media/platform/vsp1/vsp1_dl.c struct vsp1_dl_manager *dlm = dl->dlm; dlm 852 drivers/media/platform/vsp1/vsp1_dl.c struct vsp1_device *vsp1 = dlm->vsp1; dlm 861 drivers/media/platform/vsp1/vsp1_dl.c vsp1_write(vsp1, VI6_DL_HDR_ADDR(dlm->index), dl->dma); dlm 866 drivers/media/platform/vsp1/vsp1_dl.c struct vsp1_dl_manager *dlm = dl->dlm; dlm 883 drivers/media/platform/vsp1/vsp1_dl.c if (vsp1_dl_list_hw_update_pending(dlm)) { dlm 884 drivers/media/platform/vsp1/vsp1_dl.c WARN_ON(dlm->pending && dlm 885 drivers/media/platform/vsp1/vsp1_dl.c (dlm->pending->flags & VSP1_DL_FRAME_END_INTERNAL)); dlm 886 drivers/media/platform/vsp1/vsp1_dl.c __vsp1_dl_list_put(dlm->pending); dlm 887 drivers/media/platform/vsp1/vsp1_dl.c dlm->pending = dl; dlm 897 drivers/media/platform/vsp1/vsp1_dl.c __vsp1_dl_list_put(dlm->queued); dlm 898 drivers/media/platform/vsp1/vsp1_dl.c dlm->queued = dl; dlm 903 drivers/media/platform/vsp1/vsp1_dl.c struct vsp1_dl_manager *dlm = dl->dlm; dlm 912 drivers/media/platform/vsp1/vsp1_dl.c dlm->active = dl; dlm 917 drivers/media/platform/vsp1/vsp1_dl.c struct vsp1_dl_manager *dlm = dl->dlm; dlm 932 drivers/media/platform/vsp1/vsp1_dl.c spin_lock_irqsave(&dlm->lock, flags); dlm 934 drivers/media/platform/vsp1/vsp1_dl.c if (dlm->singleshot) dlm 939 drivers/media/platform/vsp1/vsp1_dl.c spin_unlock_irqrestore(&dlm->lock, flags); dlm 967 drivers/media/platform/vsp1/vsp1_dl.c unsigned int vsp1_dlm_irq_frame_end(struct vsp1_dl_manager *dlm) dlm 969 drivers/media/platform/vsp1/vsp1_dl.c struct vsp1_device *vsp1 = dlm->vsp1; dlm 973 drivers/media/platform/vsp1/vsp1_dl.c spin_lock(&dlm->lock); dlm 979 drivers/media/platform/vsp1/vsp1_dl.c if (dlm->singleshot) { dlm 980 drivers/media/platform/vsp1/vsp1_dl.c __vsp1_dl_list_put(dlm->active); dlm 981 drivers/media/platform/vsp1/vsp1_dl.c dlm->active = NULL; dlm 992 drivers/media/platform/vsp1/vsp1_dl.c if (vsp1_dl_list_hw_update_pending(dlm)) dlm 1000 drivers/media/platform/vsp1/vsp1_dl.c if (status & VI6_STATUS_FLD_STD(dlm->index)) dlm 1009 drivers/media/platform/vsp1/vsp1_dl.c if (dlm->active && (dlm->active->flags & VSP1_DL_FRAME_END_WRITEBACK)) { dlm 1011 drivers/media/platform/vsp1/vsp1_dl.c dlm->active->flags &= ~VSP1_DL_FRAME_END_WRITEBACK; dlm 1018 drivers/media/platform/vsp1/vsp1_dl.c if (dlm->queued) { dlm 1019 drivers/media/platform/vsp1/vsp1_dl.c if (dlm->queued->flags & VSP1_DL_FRAME_END_INTERNAL) dlm 1021 drivers/media/platform/vsp1/vsp1_dl.c dlm->queued->flags &= ~VSP1_DL_FRAME_END_INTERNAL; dlm 1023 drivers/media/platform/vsp1/vsp1_dl.c __vsp1_dl_list_put(dlm->active); dlm 1024 drivers/media/platform/vsp1/vsp1_dl.c dlm->active = dlm->queued; dlm 1025 drivers/media/platform/vsp1/vsp1_dl.c dlm->queued = NULL; dlm 1034 drivers/media/platform/vsp1/vsp1_dl.c if (dlm->pending) { dlm 1035 drivers/media/platform/vsp1/vsp1_dl.c vsp1_dl_list_hw_enqueue(dlm->pending); dlm 1036 drivers/media/platform/vsp1/vsp1_dl.c dlm->queued = dlm->pending; dlm 1037 drivers/media/platform/vsp1/vsp1_dl.c dlm->pending = NULL; dlm 1041 drivers/media/platform/vsp1/vsp1_dl.c spin_unlock(&dlm->lock); dlm 1065 drivers/media/platform/vsp1/vsp1_dl.c void vsp1_dlm_reset(struct vsp1_dl_manager *dlm) dlm 1069 drivers/media/platform/vsp1/vsp1_dl.c spin_lock_irqsave(&dlm->lock, flags); dlm 1071 drivers/media/platform/vsp1/vsp1_dl.c __vsp1_dl_list_put(dlm->active); dlm 1072 drivers/media/platform/vsp1/vsp1_dl.c __vsp1_dl_list_put(dlm->queued); dlm 1073 drivers/media/platform/vsp1/vsp1_dl.c __vsp1_dl_list_put(dlm->pending); dlm 1075 drivers/media/platform/vsp1/vsp1_dl.c spin_unlock_irqrestore(&dlm->lock, flags); dlm 1077 drivers/media/platform/vsp1/vsp1_dl.c dlm->active = NULL; dlm 1078 drivers/media/platform/vsp1/vsp1_dl.c dlm->queued = NULL; dlm 1079 drivers/media/platform/vsp1/vsp1_dl.c dlm->pending = NULL; dlm 1082 drivers/media/platform/vsp1/vsp1_dl.c struct vsp1_dl_body *vsp1_dlm_dl_body_get(struct vsp1_dl_manager *dlm) dlm 1084 drivers/media/platform/vsp1/vsp1_dl.c return vsp1_dl_body_get(dlm->pool); dlm 1091 drivers/media/platform/vsp1/vsp1_dl.c struct vsp1_dl_manager *dlm; dlm 1095 drivers/media/platform/vsp1/vsp1_dl.c dlm = devm_kzalloc(vsp1->dev, sizeof(*dlm), GFP_KERNEL); dlm 1096 drivers/media/platform/vsp1/vsp1_dl.c if (!dlm) dlm 1099 drivers/media/platform/vsp1/vsp1_dl.c dlm->index = index; dlm 1100 drivers/media/platform/vsp1/vsp1_dl.c dlm->singleshot = vsp1->info->uapi; dlm 1101 drivers/media/platform/vsp1/vsp1_dl.c dlm->vsp1 = vsp1; dlm 1103 drivers/media/platform/vsp1/vsp1_dl.c spin_lock_init(&dlm->lock); dlm 1104 drivers/media/platform/vsp1/vsp1_dl.c INIT_LIST_HEAD(&dlm->free); dlm 1119 drivers/media/platform/vsp1/vsp1_dl.c dlm->pool = vsp1_dl_body_pool_create(vsp1, prealloc + 1, dlm 1121 drivers/media/platform/vsp1/vsp1_dl.c if (!dlm->pool) dlm 1127 drivers/media/platform/vsp1/vsp1_dl.c dl = vsp1_dl_list_alloc(dlm); dlm 1129 drivers/media/platform/vsp1/vsp1_dl.c vsp1_dlm_destroy(dlm); dlm 1138 drivers/media/platform/vsp1/vsp1_dl.c list_add_tail(&dl->list, &dlm->free); dlm 1142 drivers/media/platform/vsp1/vsp1_dl.c dlm->cmdpool = vsp1_dl_cmd_pool_create(vsp1, dlm 1144 drivers/media/platform/vsp1/vsp1_dl.c if (!dlm->cmdpool) { dlm 1145 drivers/media/platform/vsp1/vsp1_dl.c vsp1_dlm_destroy(dlm); dlm 1150 drivers/media/platform/vsp1/vsp1_dl.c return dlm; dlm 1153 drivers/media/platform/vsp1/vsp1_dl.c void vsp1_dlm_destroy(struct vsp1_dl_manager *dlm) dlm 1157 drivers/media/platform/vsp1/vsp1_dl.c if (!dlm) dlm 1160 drivers/media/platform/vsp1/vsp1_dl.c list_for_each_entry_safe(dl, next, &dlm->free, list) { dlm 1165 drivers/media/platform/vsp1/vsp1_dl.c vsp1_dl_body_pool_destroy(dlm->pool); dlm 1166 drivers/media/platform/vsp1/vsp1_dl.c vsp1_dl_ext_cmd_pool_destroy(dlm->cmdpool); dlm 57 drivers/media/platform/vsp1/vsp1_dl.h void vsp1_dlm_destroy(struct vsp1_dl_manager *dlm); dlm 58 drivers/media/platform/vsp1/vsp1_dl.h void vsp1_dlm_reset(struct vsp1_dl_manager *dlm); dlm 59 drivers/media/platform/vsp1/vsp1_dl.h unsigned int vsp1_dlm_irq_frame_end(struct vsp1_dl_manager *dlm); dlm 60 drivers/media/platform/vsp1/vsp1_dl.h struct vsp1_dl_body *vsp1_dlm_dl_body_get(struct vsp1_dl_manager *dlm); dlm 62 drivers/media/platform/vsp1/vsp1_dl.h struct vsp1_dl_list *vsp1_dl_list_get(struct vsp1_dl_manager *dlm); dlm 549 drivers/media/platform/vsp1/vsp1_drm.c dl = vsp1_dl_list_get(pipe->output->dlm); dlm 701 drivers/media/platform/vsp1/vsp1_drm.c vsp1_dlm_reset(pipe->output->dlm); dlm 386 drivers/media/platform/vsp1/vsp1_pipe.c flags = vsp1_dlm_irq_frame_end(pipe->output->dlm); dlm 66 drivers/media/platform/vsp1/vsp1_rwpf.h struct vsp1_dl_manager *dlm; dlm 384 drivers/media/platform/vsp1/vsp1_video.c dl = vsp1_dl_list_get(pipe->output->dlm); dlm 407 drivers/media/platform/vsp1/vsp1_video.c dl_next = vsp1_dl_list_get(pipe->output->dlm); dlm 822 drivers/media/platform/vsp1/vsp1_video.c pipe->stream_config = vsp1_dlm_dl_body_get(pipe->output->dlm); dlm 232 drivers/media/platform/vsp1/vsp1_wpf.c vsp1_dlm_destroy(wpf->dlm); dlm 242 drivers/media/platform/vsp1/vsp1_wpf.c dl_next = vsp1_dl_list_get(wpf->dlm); dlm 592 drivers/media/platform/vsp1/vsp1_wpf.c wpf->dlm = vsp1_dlm_create(vsp1, index, 64); dlm 593 drivers/media/platform/vsp1/vsp1_wpf.c if (!wpf->dlm) { dlm 3204 drivers/tty/serial/8250/8250_port.c unsigned char lcr, dll, dlm; dlm 3210 drivers/tty/serial/8250/8250_port.c dlm = serial_port_in(port, UART_DLM); dlm 3213 drivers/tty/serial/8250/8250_port.c quot = (dlm << 8) | dll; dlm 442 drivers/tty/serial/pch_uart.c unsigned int dll, dlm, lcr; dlm 452 drivers/tty/serial/pch_uart.c dlm = ((unsigned int)div >> 8) & 0x00FFU; dlm 477 drivers/tty/serial/pch_uart.c iowrite8(dlm, priv->membase + PCH_UART_DLM); dlm 161 fs/dlm/lockspace.c ATTRIBUTE_GROUPS(dlm); dlm 165 fs/ocfs2/dlm/dlmapi.h enum dlm_status dlmlock(struct dlm_ctxt *dlm, dlm 175 fs/ocfs2/dlm/dlmapi.h enum dlm_status dlmunlock(struct dlm_ctxt *dlm, dlm 188 fs/ocfs2/dlm/dlmapi.h void dlm_unregister_domain(struct dlm_ctxt *dlm); dlm 201 fs/ocfs2/dlm/dlmapi.h void dlm_register_eviction_cb(struct dlm_ctxt *dlm, dlm 36 fs/ocfs2/dlm/dlmast.c static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, dlm 38 fs/ocfs2/dlm/dlmast.c static int dlm_should_cancel_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock); dlm 49 fs/ocfs2/dlm/dlmast.c static int dlm_should_cancel_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock) dlm 51 fs/ocfs2/dlm/dlmast.c assert_spin_locked(&dlm->ast_lock); dlm 76 fs/ocfs2/dlm/dlmast.c void __dlm_queue_ast(struct dlm_ctxt *dlm, struct dlm_lock *lock) dlm 80 fs/ocfs2/dlm/dlmast.c BUG_ON(!dlm); dlm 85 fs/ocfs2/dlm/dlmast.c assert_spin_locked(&dlm->ast_lock); dlm 90 fs/ocfs2/dlm/dlmast.c dlm->name, res->lockname.len, res->lockname.name, dlm 98 fs/ocfs2/dlm/dlmast.c dlm->name, res->lockname.len, res->lockname.name, dlm 107 fs/ocfs2/dlm/dlmast.c if (dlm_should_cancel_bast(dlm, lock)) { dlm 109 fs/ocfs2/dlm/dlmast.c dlm->name, res->lockname.len, res->lockname.name, dlm 124 fs/ocfs2/dlm/dlmast.c dlm_lockres_release_ast(dlm, res); dlm 126 fs/ocfs2/dlm/dlmast.c list_add_tail(&lock->ast_list, &dlm->pending_asts); dlm 131 fs/ocfs2/dlm/dlmast.c void dlm_queue_ast(struct dlm_ctxt *dlm, struct dlm_lock *lock) dlm 133 fs/ocfs2/dlm/dlmast.c BUG_ON(!dlm); dlm 136 fs/ocfs2/dlm/dlmast.c spin_lock(&dlm->ast_lock); dlm 137 fs/ocfs2/dlm/dlmast.c __dlm_queue_ast(dlm, lock); dlm 138 fs/ocfs2/dlm/dlmast.c spin_unlock(&dlm->ast_lock); dlm 142 fs/ocfs2/dlm/dlmast.c void __dlm_queue_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock) dlm 146 fs/ocfs2/dlm/dlmast.c BUG_ON(!dlm); dlm 149 fs/ocfs2/dlm/dlmast.c assert_spin_locked(&dlm->ast_lock); dlm 156 fs/ocfs2/dlm/dlmast.c dlm->name, res->lockname.len, res->lockname.name, dlm 163 fs/ocfs2/dlm/dlmast.c list_add_tail(&lock->bast_list, &dlm->pending_basts); dlm 168 fs/ocfs2/dlm/dlmast.c void dlm_queue_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock) dlm 170 fs/ocfs2/dlm/dlmast.c BUG_ON(!dlm); dlm 173 fs/ocfs2/dlm/dlmast.c spin_lock(&dlm->ast_lock); dlm 174 fs/ocfs2/dlm/dlmast.c __dlm_queue_bast(dlm, lock); dlm 175 fs/ocfs2/dlm/dlmast.c spin_unlock(&dlm->ast_lock); dlm 178 fs/ocfs2/dlm/dlmast.c static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, dlm 186 fs/ocfs2/dlm/dlmast.c if (res->owner == dlm->node_num) { dlm 190 fs/ocfs2/dlm/dlmast.c lock->ml.node == dlm->node_num ? "master" : dlm 208 fs/ocfs2/dlm/dlmast.c void dlm_do_local_ast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, dlm 213 fs/ocfs2/dlm/dlmast.c mlog(0, "%s: res %.*s, lock %u:%llu, Local AST\n", dlm->name, dlm 219 fs/ocfs2/dlm/dlmast.c BUG_ON(lock->ml.node != dlm->node_num); dlm 221 fs/ocfs2/dlm/dlmast.c dlm_update_lvb(dlm, res, lock); dlm 226 fs/ocfs2/dlm/dlmast.c int dlm_do_remote_ast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, dlm 233 fs/ocfs2/dlm/dlmast.c mlog(0, "%s: res %.*s, lock %u:%llu, Remote AST\n", dlm->name, dlm 239 fs/ocfs2/dlm/dlmast.c BUG_ON(lock->ml.node == dlm->node_num); dlm 242 fs/ocfs2/dlm/dlmast.c dlm_update_lvb(dlm, res, lock); dlm 246 fs/ocfs2/dlm/dlmast.c ret = dlm_send_proxy_ast(dlm, res, lock, lksbflags); dlm 250 fs/ocfs2/dlm/dlmast.c void dlm_do_local_bast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, dlm 255 fs/ocfs2/dlm/dlmast.c BUG_ON(lock->ml.node != dlm->node_num); dlm 258 fs/ocfs2/dlm/dlmast.c dlm->name, res->lockname.len, res->lockname.name, dlm 273 fs/ocfs2/dlm/dlmast.c struct dlm_ctxt *dlm = data; dlm 283 fs/ocfs2/dlm/dlmast.c if (!dlm_grab(dlm)) { dlm 288 fs/ocfs2/dlm/dlmast.c mlog_bug_on_msg(!dlm_domain_fully_joined(dlm), dlm 289 fs/ocfs2/dlm/dlmast.c "Domain %s not fully joined!\n", dlm->name); dlm 328 fs/ocfs2/dlm/dlmast.c res = dlm_lookup_lockres(dlm, name, locklen); dlm 340 fs/ocfs2/dlm/dlmast.c BUG_ON(res->owner == dlm->node_num); dlm 342 fs/ocfs2/dlm/dlmast.c mlog(0, "%s: res %.*s\n", dlm->name, res->lockname.len, dlm 396 fs/ocfs2/dlm/dlmast.c dlm->name, res->lockname.len, res->lockname.name, dlm 419 fs/ocfs2/dlm/dlmast.c dlm_do_local_ast(dlm, res, lock); dlm 421 fs/ocfs2/dlm/dlmast.c dlm_do_local_bast(dlm, res, lock, past->blocked_type); dlm 427 fs/ocfs2/dlm/dlmast.c dlm_put(dlm); dlm 433 fs/ocfs2/dlm/dlmast.c int dlm_send_proxy_ast_msg(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, dlm 443 fs/ocfs2/dlm/dlmast.c mlog(0, "%s: res %.*s, to %u, type %d, blocked_type %d\n", dlm->name, dlm 448 fs/ocfs2/dlm/dlmast.c past.node_idx = dlm->node_num; dlm 464 fs/ocfs2/dlm/dlmast.c ret = o2net_send_message_vec(DLM_PROXY_AST_MSG, dlm->key, vec, veclen, dlm 468 fs/ocfs2/dlm/dlmast.c dlm->name, res->lockname.len, res->lockname.name, ret, dlm 47 fs/ocfs2/dlm/dlmcommon.h struct dlm_ctxt *dlm; dlm 175 fs/ocfs2/dlm/dlmcommon.h static inline struct hlist_head *dlm_lockres_hash(struct dlm_ctxt *dlm, unsigned i) dlm 177 fs/ocfs2/dlm/dlmcommon.h return dlm->lockres_hash[(i / DLM_BUCKETS_PER_PAGE) % DLM_HASH_PAGES] + (i % DLM_BUCKETS_PER_PAGE); dlm 180 fs/ocfs2/dlm/dlmcommon.h static inline struct hlist_head *dlm_master_hash(struct dlm_ctxt *dlm, dlm 183 fs/ocfs2/dlm/dlmcommon.h return dlm->master_hash[(i / DLM_BUCKETS_PER_PAGE) % DLM_HASH_PAGES] + dlm 229 fs/ocfs2/dlm/dlmcommon.h struct dlm_ctxt *dlm; dlm 239 fs/ocfs2/dlm/dlmcommon.h static inline void dlm_init_work_item(struct dlm_ctxt *dlm, dlm 247 fs/ocfs2/dlm/dlmcommon.h i->dlm = dlm; /* must have already done a dlm_grab on this! */ dlm 252 fs/ocfs2/dlm/dlmcommon.h static inline void __dlm_set_joining_node(struct dlm_ctxt *dlm, dlm 255 fs/ocfs2/dlm/dlmcommon.h assert_spin_locked(&dlm->spinlock); dlm 257 fs/ocfs2/dlm/dlmcommon.h dlm->joining_node = node; dlm 258 fs/ocfs2/dlm/dlmcommon.h wake_up(&dlm->dlm_join_events); dlm 310 fs/ocfs2/dlm/dlmcommon.h struct dlm_ctxt *dlm; dlm 846 fs/ocfs2/dlm/dlmcommon.h int dlm_launch_thread(struct dlm_ctxt *dlm); dlm 847 fs/ocfs2/dlm/dlmcommon.h void dlm_complete_thread(struct dlm_ctxt *dlm); dlm 848 fs/ocfs2/dlm/dlmcommon.h int dlm_launch_recovery_thread(struct dlm_ctxt *dlm); dlm 849 fs/ocfs2/dlm/dlmcommon.h void dlm_complete_recovery_thread(struct dlm_ctxt *dlm); dlm 850 fs/ocfs2/dlm/dlmcommon.h void dlm_wait_for_recovery(struct dlm_ctxt *dlm); dlm 851 fs/ocfs2/dlm/dlmcommon.h void dlm_kick_recovery_thread(struct dlm_ctxt *dlm); dlm 852 fs/ocfs2/dlm/dlmcommon.h int dlm_is_node_dead(struct dlm_ctxt *dlm, u8 node); dlm 853 fs/ocfs2/dlm/dlmcommon.h void dlm_wait_for_node_death(struct dlm_ctxt *dlm, u8 node, int timeout); dlm 854 fs/ocfs2/dlm/dlmcommon.h void dlm_wait_for_node_recovery(struct dlm_ctxt *dlm, u8 node, int timeout); dlm 856 fs/ocfs2/dlm/dlmcommon.h void dlm_put(struct dlm_ctxt *dlm); dlm 857 fs/ocfs2/dlm/dlmcommon.h struct dlm_ctxt *dlm_grab(struct dlm_ctxt *dlm); dlm 858 fs/ocfs2/dlm/dlmcommon.h int dlm_domain_fully_joined(struct dlm_ctxt *dlm); dlm 860 fs/ocfs2/dlm/dlmcommon.h void __dlm_lockres_calc_usage(struct dlm_ctxt *dlm, dlm 862 fs/ocfs2/dlm/dlmcommon.h void dlm_lockres_calc_usage(struct dlm_ctxt *dlm, dlm 871 fs/ocfs2/dlm/dlmcommon.h void __dlm_unhash_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res); dlm 872 fs/ocfs2/dlm/dlmcommon.h void __dlm_insert_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res); dlm 873 fs/ocfs2/dlm/dlmcommon.h struct dlm_lock_resource * __dlm_lookup_lockres_full(struct dlm_ctxt *dlm, dlm 877 fs/ocfs2/dlm/dlmcommon.h struct dlm_lock_resource * __dlm_lookup_lockres(struct dlm_ctxt *dlm, dlm 881 fs/ocfs2/dlm/dlmcommon.h struct dlm_lock_resource * dlm_lookup_lockres(struct dlm_ctxt *dlm, dlm 887 fs/ocfs2/dlm/dlmcommon.h struct dlm_lock_resource * dlm_get_lock_resource(struct dlm_ctxt *dlm, dlm 891 fs/ocfs2/dlm/dlmcommon.h struct dlm_lock_resource *dlm_new_lockres(struct dlm_ctxt *dlm, dlm 895 fs/ocfs2/dlm/dlmcommon.h void dlm_lockres_set_refmap_bit(struct dlm_ctxt *dlm, dlm 897 fs/ocfs2/dlm/dlmcommon.h void dlm_lockres_clear_refmap_bit(struct dlm_ctxt *dlm, dlm 900 fs/ocfs2/dlm/dlmcommon.h void dlm_lockres_drop_inflight_ref(struct dlm_ctxt *dlm, dlm 902 fs/ocfs2/dlm/dlmcommon.h void dlm_lockres_grab_inflight_ref(struct dlm_ctxt *dlm, dlm 905 fs/ocfs2/dlm/dlmcommon.h void __dlm_lockres_grab_inflight_worker(struct dlm_ctxt *dlm, dlm 908 fs/ocfs2/dlm/dlmcommon.h void dlm_queue_ast(struct dlm_ctxt *dlm, struct dlm_lock *lock); dlm 909 fs/ocfs2/dlm/dlmcommon.h void dlm_queue_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock); dlm 910 fs/ocfs2/dlm/dlmcommon.h void __dlm_queue_ast(struct dlm_ctxt *dlm, struct dlm_lock *lock); dlm 911 fs/ocfs2/dlm/dlmcommon.h void __dlm_queue_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock); dlm 912 fs/ocfs2/dlm/dlmcommon.h void dlm_do_local_ast(struct dlm_ctxt *dlm, dlm 915 fs/ocfs2/dlm/dlmcommon.h int dlm_do_remote_ast(struct dlm_ctxt *dlm, dlm 918 fs/ocfs2/dlm/dlmcommon.h void dlm_do_local_bast(struct dlm_ctxt *dlm, dlm 922 fs/ocfs2/dlm/dlmcommon.h int dlm_send_proxy_ast_msg(struct dlm_ctxt *dlm, dlm 927 fs/ocfs2/dlm/dlmcommon.h static inline int dlm_send_proxy_bast(struct dlm_ctxt *dlm, dlm 932 fs/ocfs2/dlm/dlmcommon.h return dlm_send_proxy_ast_msg(dlm, res, lock, DLM_BAST, dlm 936 fs/ocfs2/dlm/dlmcommon.h static inline int dlm_send_proxy_ast(struct dlm_ctxt *dlm, dlm 941 fs/ocfs2/dlm/dlmcommon.h return dlm_send_proxy_ast_msg(dlm, res, lock, DLM_AST, dlm 948 fs/ocfs2/dlm/dlmcommon.h void dlm_kick_thread(struct dlm_ctxt *dlm, struct dlm_lock_resource *res); dlm 949 fs/ocfs2/dlm/dlmcommon.h void __dlm_dirty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res); dlm 955 fs/ocfs2/dlm/dlmcommon.h int dlm_empty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res); dlm 956 fs/ocfs2/dlm/dlmcommon.h int dlm_finish_migration(struct dlm_ctxt *dlm, dlm 959 fs/ocfs2/dlm/dlmcommon.h void dlm_lockres_release_ast(struct dlm_ctxt *dlm, dlm 986 fs/ocfs2/dlm/dlmcommon.h int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, dlm 989 fs/ocfs2/dlm/dlmcommon.h void __dlm_do_purge_lockres(struct dlm_ctxt *dlm, dlm 992 fs/ocfs2/dlm/dlmcommon.h int dlm_dispatch_assert_master(struct dlm_ctxt *dlm, dlm 999 fs/ocfs2/dlm/dlmcommon.h int dlm_send_one_lockres(struct dlm_ctxt *dlm, dlm 1004 fs/ocfs2/dlm/dlmcommon.h void dlm_move_lockres_to_recovery_list(struct dlm_ctxt *dlm, dlm 1019 fs/ocfs2/dlm/dlmcommon.h void __dlm_unlink_mle(struct dlm_ctxt *dlm, struct dlm_master_list_entry *mle); dlm 1020 fs/ocfs2/dlm/dlmcommon.h void __dlm_insert_mle(struct dlm_ctxt *dlm, struct dlm_master_list_entry *mle); dlm 1032 fs/ocfs2/dlm/dlmcommon.h void dlm_hb_event_notify_attached(struct dlm_ctxt *dlm, int idx, int node_up); dlm 1033 fs/ocfs2/dlm/dlmcommon.h int dlm_drop_lockres_ref(struct dlm_ctxt *dlm, dlm 1035 fs/ocfs2/dlm/dlmcommon.h void dlm_clean_master_list(struct dlm_ctxt *dlm, dlm 1037 fs/ocfs2/dlm/dlmcommon.h void dlm_force_free_mles(struct dlm_ctxt *dlm); dlm 1038 fs/ocfs2/dlm/dlmcommon.h int dlm_lock_basts_flushed(struct dlm_ctxt *dlm, struct dlm_lock *lock); dlm 1123 fs/ocfs2/dlm/dlmcommon.h static inline void dlm_set_lockres_owner(struct dlm_ctxt *dlm, dlm 1132 fs/ocfs2/dlm/dlmcommon.h static inline void dlm_change_lockres_owner(struct dlm_ctxt *dlm, dlm 1139 fs/ocfs2/dlm/dlmcommon.h dlm_set_lockres_owner(dlm, res, owner); dlm 43 fs/ocfs2/dlm/dlmconvert.c static enum dlm_status __dlmconvert_master(struct dlm_ctxt *dlm, dlm 48 fs/ocfs2/dlm/dlmconvert.c static enum dlm_status dlm_send_remote_convert_request(struct dlm_ctxt *dlm, dlm 61 fs/ocfs2/dlm/dlmconvert.c enum dlm_status dlmconvert_master(struct dlm_ctxt *dlm, dlm 74 fs/ocfs2/dlm/dlmconvert.c status = __dlmconvert_master(dlm, res, lock, flags, type, dlm 85 fs/ocfs2/dlm/dlmconvert.c dlm_queue_ast(dlm, lock); dlm 87 fs/ocfs2/dlm/dlmconvert.c dlm_lockres_release_ast(dlm, res); dlm 90 fs/ocfs2/dlm/dlmconvert.c dlm_kick_thread(dlm, res); dlm 104 fs/ocfs2/dlm/dlmconvert.c static enum dlm_status __dlmconvert_master(struct dlm_ctxt *dlm, dlm 194 fs/ocfs2/dlm/dlmconvert.c if (lock->ml.node == dlm->node_num) dlm 251 fs/ocfs2/dlm/dlmconvert.c enum dlm_status dlmconvert_remote(struct dlm_ctxt *dlm, dlm 318 fs/ocfs2/dlm/dlmconvert.c status = dlm_send_remote_convert_request(dlm, res, lock, flags, type); dlm 333 fs/ocfs2/dlm/dlmconvert.c dlm->name, res->lockname.len, res->lockname.name); dlm 355 fs/ocfs2/dlm/dlmconvert.c static enum dlm_status dlm_send_remote_convert_request(struct dlm_ctxt *dlm, dlm 369 fs/ocfs2/dlm/dlmconvert.c convert.node_idx = dlm->node_num; dlm 386 fs/ocfs2/dlm/dlmconvert.c tmpret = o2net_send_message_vec(DLM_CONVERT_LOCK_MSG, dlm->key, dlm 404 fs/ocfs2/dlm/dlmconvert.c "node %u\n", tmpret, DLM_CONVERT_LOCK_MSG, dlm->key, dlm 410 fs/ocfs2/dlm/dlmconvert.c dlm_wait_for_node_death(dlm, res->owner, dlm 434 fs/ocfs2/dlm/dlmconvert.c struct dlm_ctxt *dlm = data; dlm 444 fs/ocfs2/dlm/dlmconvert.c if (!dlm_grab(dlm)) { dlm 449 fs/ocfs2/dlm/dlmconvert.c mlog_bug_on_msg(!dlm_domain_fully_joined(dlm), dlm 450 fs/ocfs2/dlm/dlmconvert.c "Domain %s not fully joined!\n", dlm->name); dlm 471 fs/ocfs2/dlm/dlmconvert.c res = dlm_lookup_lockres(dlm, cnv->name, cnv->namelen); dlm 522 fs/ocfs2/dlm/dlmconvert.c status = __dlmconvert_master(dlm, res, lock, flags, dlm 544 fs/ocfs2/dlm/dlmconvert.c dlm_queue_ast(dlm, lock); dlm 546 fs/ocfs2/dlm/dlmconvert.c dlm_lockres_release_ast(dlm, res); dlm 549 fs/ocfs2/dlm/dlmconvert.c dlm_kick_thread(dlm, res); dlm 554 fs/ocfs2/dlm/dlmconvert.c dlm_put(dlm); dlm 13 fs/ocfs2/dlm/dlmconvert.h enum dlm_status dlmconvert_master(struct dlm_ctxt *dlm, dlm 16 fs/ocfs2/dlm/dlmconvert.h enum dlm_status dlmconvert_remote(struct dlm_ctxt *dlm, dlm 350 fs/ocfs2/dlm/dlmdebug.c static int debug_purgelist_print(struct dlm_ctxt *dlm, char *buf, int len) dlm 357 fs/ocfs2/dlm/dlmdebug.c "Dumping Purgelist for Domain: %s\n", dlm->name); dlm 359 fs/ocfs2/dlm/dlmdebug.c spin_lock(&dlm->spinlock); dlm 360 fs/ocfs2/dlm/dlmdebug.c list_for_each_entry(res, &dlm->purge_list, purge) { dlm 372 fs/ocfs2/dlm/dlmdebug.c spin_unlock(&dlm->spinlock); dlm 381 fs/ocfs2/dlm/dlmdebug.c struct dlm_ctxt *dlm = inode->i_private; dlm 388 fs/ocfs2/dlm/dlmdebug.c i_size_write(inode, debug_purgelist_print(dlm, buf, PAGE_SIZE - 1)); dlm 406 fs/ocfs2/dlm/dlmdebug.c static int debug_mle_print(struct dlm_ctxt *dlm, char *buf, int len) dlm 414 fs/ocfs2/dlm/dlmdebug.c "Dumping MLEs for Domain: %s\n", dlm->name); dlm 416 fs/ocfs2/dlm/dlmdebug.c spin_lock(&dlm->master_lock); dlm 418 fs/ocfs2/dlm/dlmdebug.c bucket = dlm_master_hash(dlm, i); dlm 429 fs/ocfs2/dlm/dlmdebug.c spin_unlock(&dlm->master_lock); dlm 438 fs/ocfs2/dlm/dlmdebug.c struct dlm_ctxt *dlm = inode->i_private; dlm 445 fs/ocfs2/dlm/dlmdebug.c i_size_write(inode, debug_mle_print(dlm, buf, PAGE_SIZE - 1)); dlm 544 fs/ocfs2/dlm/dlmdebug.c struct dlm_ctxt *dlm = dl->dl_ctxt; dlm 549 fs/ocfs2/dlm/dlmdebug.c spin_lock(&dlm->track_lock); dlm 553 fs/ocfs2/dlm/dlmdebug.c track_list = &dlm->tracking_list; dlm 556 fs/ocfs2/dlm/dlmdebug.c spin_unlock(&dlm->track_lock); dlm 562 fs/ocfs2/dlm/dlmdebug.c if (&res->tracking == &dlm->tracking_list) dlm 568 fs/ocfs2/dlm/dlmdebug.c spin_unlock(&dlm->track_lock); dlm 614 fs/ocfs2/dlm/dlmdebug.c struct dlm_ctxt *dlm = inode->i_private; dlm 629 fs/ocfs2/dlm/dlmdebug.c dlm_grab(dlm); dlm 630 fs/ocfs2/dlm/dlmdebug.c dl->dl_ctxt = dlm; dlm 662 fs/ocfs2/dlm/dlmdebug.c static int debug_state_print(struct dlm_ctxt *dlm, char *buf, int len) dlm 670 fs/ocfs2/dlm/dlmdebug.c spin_lock(&dlm->spinlock); dlm 672 fs/ocfs2/dlm/dlmdebug.c switch (dlm->dlm_state) { dlm 688 fs/ocfs2/dlm/dlmdebug.c dlm->name, dlm->key, dlm->dlm_locking_proto.pv_major, dlm 689 fs/ocfs2/dlm/dlmdebug.c dlm->dlm_locking_proto.pv_minor); dlm 694 fs/ocfs2/dlm/dlmdebug.c task_pid_nr(dlm->dlm_thread_task), dlm->node_num, state); dlm 699 fs/ocfs2/dlm/dlmdebug.c dlm->num_joins, dlm->joining_node); dlm 703 fs/ocfs2/dlm/dlmdebug.c out += stringify_nodemap(dlm->domain_map, O2NM_MAX_NODES, dlm 709 fs/ocfs2/dlm/dlmdebug.c out += stringify_nodemap(dlm->exit_domain_map, O2NM_MAX_NODES, dlm 715 fs/ocfs2/dlm/dlmdebug.c out += stringify_nodemap(dlm->live_nodes_map, O2NM_MAX_NODES, dlm 722 fs/ocfs2/dlm/dlmdebug.c atomic_read(&dlm->res_cur_count), dlm 723 fs/ocfs2/dlm/dlmdebug.c atomic_read(&dlm->res_tot_count)); dlm 726 fs/ocfs2/dlm/dlmdebug.c tot_mles += atomic_read(&dlm->mle_tot_count[i]); dlm 729 fs/ocfs2/dlm/dlmdebug.c cur_mles += atomic_read(&dlm->mle_cur_count[i]); dlm 738 fs/ocfs2/dlm/dlmdebug.c atomic_read(&dlm->mle_cur_count[DLM_MLE_BLOCK]), dlm 739 fs/ocfs2/dlm/dlmdebug.c atomic_read(&dlm->mle_tot_count[DLM_MLE_BLOCK])); dlm 744 fs/ocfs2/dlm/dlmdebug.c atomic_read(&dlm->mle_cur_count[DLM_MLE_MASTER]), dlm 745 fs/ocfs2/dlm/dlmdebug.c atomic_read(&dlm->mle_tot_count[DLM_MLE_MASTER])); dlm 750 fs/ocfs2/dlm/dlmdebug.c atomic_read(&dlm->mle_cur_count[DLM_MLE_MIGRATION]), dlm 751 fs/ocfs2/dlm/dlmdebug.c atomic_read(&dlm->mle_tot_count[DLM_MLE_MIGRATION])); dlm 757 fs/ocfs2/dlm/dlmdebug.c (list_empty(&dlm->dirty_list) ? "Empty" : "InUse"), dlm 758 fs/ocfs2/dlm/dlmdebug.c (list_empty(&dlm->purge_list) ? "Empty" : "InUse"), dlm 759 fs/ocfs2/dlm/dlmdebug.c (list_empty(&dlm->pending_asts) ? "Empty" : "InUse"), dlm 760 fs/ocfs2/dlm/dlmdebug.c (list_empty(&dlm->pending_basts) ? "Empty" : "InUse")); dlm 764 fs/ocfs2/dlm/dlmdebug.c "Purge Count: %d Refs: %d\n", dlm->purge_count, dlm 765 fs/ocfs2/dlm/dlmdebug.c kref_read(&dlm->dlm_refs)); dlm 769 fs/ocfs2/dlm/dlmdebug.c "Dead Node: %d\n", dlm->reco.dead_node); dlm 772 fs/ocfs2/dlm/dlmdebug.c if (dlm->reco.state == DLM_RECO_STATE_ACTIVE) dlm 780 fs/ocfs2/dlm/dlmdebug.c task_pid_nr(dlm->dlm_reco_thread_task), dlm 781 fs/ocfs2/dlm/dlmdebug.c dlm->reco.new_master, state); dlm 785 fs/ocfs2/dlm/dlmdebug.c out += stringify_nodemap(dlm->recovery_map, O2NM_MAX_NODES, dlm 791 fs/ocfs2/dlm/dlmdebug.c list_for_each_entry(node, &dlm->reco.node_data, list) { dlm 822 fs/ocfs2/dlm/dlmdebug.c spin_unlock(&dlm->spinlock); dlm 829 fs/ocfs2/dlm/dlmdebug.c struct dlm_ctxt *dlm = inode->i_private; dlm 836 fs/ocfs2/dlm/dlmdebug.c i_size_write(inode, debug_state_print(dlm, buf, PAGE_SIZE - 1)); dlm 854 fs/ocfs2/dlm/dlmdebug.c void dlm_debug_init(struct dlm_ctxt *dlm) dlm 858 fs/ocfs2/dlm/dlmdebug.c dlm->dlm_debugfs_subroot, dlm, &debug_state_fops); dlm 862 fs/ocfs2/dlm/dlmdebug.c dlm->dlm_debugfs_subroot, dlm, &debug_lockres_fops); dlm 866 fs/ocfs2/dlm/dlmdebug.c dlm->dlm_debugfs_subroot, dlm, &debug_mle_fops); dlm 870 fs/ocfs2/dlm/dlmdebug.c dlm->dlm_debugfs_subroot, dlm, dlm 875 fs/ocfs2/dlm/dlmdebug.c void dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) dlm 877 fs/ocfs2/dlm/dlmdebug.c dlm->dlm_debugfs_subroot = debugfs_create_dir(dlm->name, dlm 881 fs/ocfs2/dlm/dlmdebug.c void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) dlm 883 fs/ocfs2/dlm/dlmdebug.c debugfs_remove_recursive(dlm->dlm_debugfs_subroot); dlm 24 fs/ocfs2/dlm/dlmdebug.h void dlm_debug_init(struct dlm_ctxt *dlm); dlm 26 fs/ocfs2/dlm/dlmdebug.h void dlm_create_debugfs_subroot(struct dlm_ctxt *dlm); dlm 27 fs/ocfs2/dlm/dlmdebug.h void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm); dlm 34 fs/ocfs2/dlm/dlmdebug.h static inline void dlm_debug_init(struct dlm_ctxt *dlm) dlm 37 fs/ocfs2/dlm/dlmdebug.h static inline void dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) dlm 40 fs/ocfs2/dlm/dlmdebug.h static inline void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) dlm 145 fs/ocfs2/dlm/dlmdomain.c static void dlm_unregister_domain_handlers(struct dlm_ctxt *dlm); dlm 147 fs/ocfs2/dlm/dlmdomain.c void __dlm_unhash_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res) dlm 152 fs/ocfs2/dlm/dlmdomain.c mlog(0, "%s: Unhash res %.*s\n", dlm->name, res->lockname.len, dlm 158 fs/ocfs2/dlm/dlmdomain.c void __dlm_insert_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res) dlm 162 fs/ocfs2/dlm/dlmdomain.c assert_spin_locked(&dlm->spinlock); dlm 164 fs/ocfs2/dlm/dlmdomain.c bucket = dlm_lockres_hash(dlm, res->lockname.hash); dlm 171 fs/ocfs2/dlm/dlmdomain.c mlog(0, "%s: Hash res %.*s\n", dlm->name, res->lockname.len, dlm 175 fs/ocfs2/dlm/dlmdomain.c struct dlm_lock_resource * __dlm_lookup_lockres_full(struct dlm_ctxt *dlm, dlm 185 fs/ocfs2/dlm/dlmdomain.c assert_spin_locked(&dlm->spinlock); dlm 187 fs/ocfs2/dlm/dlmdomain.c bucket = dlm_lockres_hash(dlm, hash); dlm 208 fs/ocfs2/dlm/dlmdomain.c struct dlm_lock_resource * __dlm_lookup_lockres(struct dlm_ctxt *dlm, dlm 217 fs/ocfs2/dlm/dlmdomain.c assert_spin_locked(&dlm->spinlock); dlm 219 fs/ocfs2/dlm/dlmdomain.c res = __dlm_lookup_lockres_full(dlm, name, len, hash); dlm 233 fs/ocfs2/dlm/dlmdomain.c struct dlm_lock_resource * dlm_lookup_lockres(struct dlm_ctxt *dlm, dlm 240 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 241 fs/ocfs2/dlm/dlmdomain.c res = __dlm_lookup_lockres(dlm, name, len, hash); dlm 242 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 292 fs/ocfs2/dlm/dlmdomain.c static void dlm_free_ctxt_mem(struct dlm_ctxt *dlm) dlm 294 fs/ocfs2/dlm/dlmdomain.c dlm_destroy_debugfs_subroot(dlm); dlm 296 fs/ocfs2/dlm/dlmdomain.c if (dlm->lockres_hash) dlm 297 fs/ocfs2/dlm/dlmdomain.c dlm_free_pagevec((void **)dlm->lockres_hash, DLM_HASH_PAGES); dlm 299 fs/ocfs2/dlm/dlmdomain.c if (dlm->master_hash) dlm 300 fs/ocfs2/dlm/dlmdomain.c dlm_free_pagevec((void **)dlm->master_hash, DLM_HASH_PAGES); dlm 302 fs/ocfs2/dlm/dlmdomain.c kfree(dlm->name); dlm 303 fs/ocfs2/dlm/dlmdomain.c kfree(dlm); dlm 311 fs/ocfs2/dlm/dlmdomain.c struct dlm_ctxt *dlm; dlm 313 fs/ocfs2/dlm/dlmdomain.c dlm = container_of(kref, struct dlm_ctxt, dlm_refs); dlm 315 fs/ocfs2/dlm/dlmdomain.c BUG_ON(dlm->num_joins); dlm 316 fs/ocfs2/dlm/dlmdomain.c BUG_ON(dlm->dlm_state == DLM_CTXT_JOINED); dlm 319 fs/ocfs2/dlm/dlmdomain.c list_del_init(&dlm->list); dlm 323 fs/ocfs2/dlm/dlmdomain.c mlog(0, "freeing memory from domain %s\n", dlm->name); dlm 327 fs/ocfs2/dlm/dlmdomain.c dlm_free_ctxt_mem(dlm); dlm 332 fs/ocfs2/dlm/dlmdomain.c void dlm_put(struct dlm_ctxt *dlm) dlm 335 fs/ocfs2/dlm/dlmdomain.c kref_put(&dlm->dlm_refs, dlm_ctxt_release); dlm 339 fs/ocfs2/dlm/dlmdomain.c static void __dlm_get(struct dlm_ctxt *dlm) dlm 341 fs/ocfs2/dlm/dlmdomain.c kref_get(&dlm->dlm_refs); dlm 347 fs/ocfs2/dlm/dlmdomain.c struct dlm_ctxt *dlm_grab(struct dlm_ctxt *dlm) dlm 355 fs/ocfs2/dlm/dlmdomain.c if (target == dlm) { dlm 367 fs/ocfs2/dlm/dlmdomain.c int dlm_domain_fully_joined(struct dlm_ctxt *dlm) dlm 372 fs/ocfs2/dlm/dlmdomain.c ret = (dlm->dlm_state == DLM_CTXT_JOINED) || dlm 373 fs/ocfs2/dlm/dlmdomain.c (dlm->dlm_state == DLM_CTXT_IN_SHUTDOWN); dlm 379 fs/ocfs2/dlm/dlmdomain.c static void dlm_destroy_dlm_worker(struct dlm_ctxt *dlm) dlm 381 fs/ocfs2/dlm/dlmdomain.c if (dlm->dlm_worker) { dlm 382 fs/ocfs2/dlm/dlmdomain.c destroy_workqueue(dlm->dlm_worker); dlm 383 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_worker = NULL; dlm 387 fs/ocfs2/dlm/dlmdomain.c static void dlm_complete_dlm_shutdown(struct dlm_ctxt *dlm) dlm 389 fs/ocfs2/dlm/dlmdomain.c dlm_unregister_domain_handlers(dlm); dlm 390 fs/ocfs2/dlm/dlmdomain.c dlm_complete_thread(dlm); dlm 391 fs/ocfs2/dlm/dlmdomain.c dlm_complete_recovery_thread(dlm); dlm 392 fs/ocfs2/dlm/dlmdomain.c dlm_destroy_dlm_worker(dlm); dlm 398 fs/ocfs2/dlm/dlmdomain.c list_del_init(&dlm->list); dlm 405 fs/ocfs2/dlm/dlmdomain.c static int dlm_migrate_all_locks(struct dlm_ctxt *dlm) dlm 413 fs/ocfs2/dlm/dlmdomain.c mlog(0, "Migrating locks from domain %s\n", dlm->name); dlm 416 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 420 fs/ocfs2/dlm/dlmdomain.c bucket = dlm_lockres_hash(dlm, i); dlm 429 fs/ocfs2/dlm/dlmdomain.c dropped = dlm_empty_lockres(dlm, res); dlm 433 fs/ocfs2/dlm/dlmdomain.c __dlm_lockres_calc_usage(dlm, res); dlm 441 fs/ocfs2/dlm/dlmdomain.c cond_resched_lock(&dlm->spinlock); dlm 445 fs/ocfs2/dlm/dlmdomain.c cond_resched_lock(&dlm->spinlock); dlm 450 fs/ocfs2/dlm/dlmdomain.c if (dlm->reco.state & DLM_RECO_STATE_ACTIVE) { dlm 452 fs/ocfs2/dlm/dlmdomain.c "need to be migrated after dlm recovery\n", dlm->name); dlm 456 fs/ocfs2/dlm/dlmdomain.c "all lock resources\n", dlm->name); dlm 457 fs/ocfs2/dlm/dlmdomain.c dlm->migrate_done = 1; dlm 461 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 462 fs/ocfs2/dlm/dlmdomain.c wake_up(&dlm->dlm_thread_wq); dlm 468 fs/ocfs2/dlm/dlmdomain.c dlm->name, num); dlm 471 fs/ocfs2/dlm/dlmdomain.c mlog(0, "DONE Migrating locks from domain %s\n", dlm->name); dlm 475 fs/ocfs2/dlm/dlmdomain.c static int dlm_no_joining_node(struct dlm_ctxt *dlm) dlm 479 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 480 fs/ocfs2/dlm/dlmdomain.c ret = dlm->joining_node == DLM_LOCK_RES_OWNER_UNKNOWN; dlm 481 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 489 fs/ocfs2/dlm/dlmdomain.c struct dlm_ctxt *dlm = data; dlm 493 fs/ocfs2/dlm/dlmdomain.c if (!dlm_grab(dlm)) dlm 497 fs/ocfs2/dlm/dlmdomain.c mlog(0, "%s: Node %u sent a begin exit domain message\n", dlm->name, node); dlm 499 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 500 fs/ocfs2/dlm/dlmdomain.c set_bit(node, dlm->exit_domain_map); dlm 501 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 503 fs/ocfs2/dlm/dlmdomain.c dlm_put(dlm); dlm 508 fs/ocfs2/dlm/dlmdomain.c static void dlm_mark_domain_leaving(struct dlm_ctxt *dlm) dlm 514 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 516 fs/ocfs2/dlm/dlmdomain.c if (dlm->joining_node != DLM_LOCK_RES_OWNER_UNKNOWN) { dlm 518 fs/ocfs2/dlm/dlmdomain.c dlm->joining_node); dlm 519 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 522 fs/ocfs2/dlm/dlmdomain.c wait_event(dlm->dlm_join_events, dlm_no_joining_node(dlm)); dlm 526 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_state = DLM_CTXT_LEAVING; dlm 527 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 531 fs/ocfs2/dlm/dlmdomain.c static void __dlm_print_nodes(struct dlm_ctxt *dlm) dlm 535 fs/ocfs2/dlm/dlmdomain.c assert_spin_locked(&dlm->spinlock); dlm 538 fs/ocfs2/dlm/dlmdomain.c while ((node = find_next_bit(dlm->domain_map, O2NM_MAX_NODES, dlm 549 fs/ocfs2/dlm/dlmdomain.c struct dlm_ctxt *dlm = data; dlm 555 fs/ocfs2/dlm/dlmdomain.c if (!dlm_grab(dlm)) dlm 560 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 561 fs/ocfs2/dlm/dlmdomain.c clear_bit(node, dlm->domain_map); dlm 562 fs/ocfs2/dlm/dlmdomain.c clear_bit(node, dlm->exit_domain_map); dlm 563 fs/ocfs2/dlm/dlmdomain.c printk(KERN_NOTICE "o2dlm: Node %u leaves domain %s ", node, dlm->name); dlm 564 fs/ocfs2/dlm/dlmdomain.c __dlm_print_nodes(dlm); dlm 567 fs/ocfs2/dlm/dlmdomain.c dlm_hb_event_notify_attached(dlm, node, 0); dlm 569 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 571 fs/ocfs2/dlm/dlmdomain.c dlm_put(dlm); dlm 576 fs/ocfs2/dlm/dlmdomain.c static int dlm_send_one_domain_exit(struct dlm_ctxt *dlm, u32 msg_type, dlm 582 fs/ocfs2/dlm/dlmdomain.c mlog(0, "%s: Sending domain exit message %u to node %u\n", dlm->name, dlm 586 fs/ocfs2/dlm/dlmdomain.c leave_msg.node_idx = dlm->node_num; dlm 588 fs/ocfs2/dlm/dlmdomain.c status = o2net_send_message(msg_type, dlm->key, &leave_msg, dlm 593 fs/ocfs2/dlm/dlmdomain.c dlm->name); dlm 598 fs/ocfs2/dlm/dlmdomain.c static void dlm_begin_exit_domain(struct dlm_ctxt *dlm) dlm 603 fs/ocfs2/dlm/dlmdomain.c if (dlm->dlm_locking_proto.pv_major == 1 && dlm 604 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_locking_proto.pv_minor < 2) dlm 612 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 614 fs/ocfs2/dlm/dlmdomain.c node = find_next_bit(dlm->domain_map, O2NM_MAX_NODES, node + 1); dlm 617 fs/ocfs2/dlm/dlmdomain.c if (node == dlm->node_num) dlm 620 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 621 fs/ocfs2/dlm/dlmdomain.c dlm_send_one_domain_exit(dlm, DLM_BEGIN_EXIT_DOMAIN_MSG, node); dlm 622 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 624 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 627 fs/ocfs2/dlm/dlmdomain.c static void dlm_leave_domain(struct dlm_ctxt *dlm) dlm 636 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 638 fs/ocfs2/dlm/dlmdomain.c clear_bit(dlm->node_num, dlm->domain_map); dlm 639 fs/ocfs2/dlm/dlmdomain.c while ((node = find_next_bit(dlm->domain_map, O2NM_MAX_NODES, dlm 647 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 651 fs/ocfs2/dlm/dlmdomain.c status = dlm_send_one_domain_exit(dlm, DLM_EXIT_DOMAIN_MSG, dlm 666 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 670 fs/ocfs2/dlm/dlmdomain.c clear_bit(node, dlm->domain_map); dlm 672 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 675 fs/ocfs2/dlm/dlmdomain.c void dlm_unregister_domain(struct dlm_ctxt *dlm) dlm 681 fs/ocfs2/dlm/dlmdomain.c BUG_ON(dlm->dlm_state != DLM_CTXT_JOINED); dlm 682 fs/ocfs2/dlm/dlmdomain.c BUG_ON(!dlm->num_joins); dlm 684 fs/ocfs2/dlm/dlmdomain.c dlm->num_joins--; dlm 685 fs/ocfs2/dlm/dlmdomain.c if (!dlm->num_joins) { dlm 692 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_state = DLM_CTXT_IN_SHUTDOWN; dlm 698 fs/ocfs2/dlm/dlmdomain.c mlog(0, "shutting down domain %s\n", dlm->name); dlm 699 fs/ocfs2/dlm/dlmdomain.c dlm_begin_exit_domain(dlm); dlm 702 fs/ocfs2/dlm/dlmdomain.c dlm_kick_thread(dlm, NULL); dlm 704 fs/ocfs2/dlm/dlmdomain.c while (dlm_migrate_all_locks(dlm)) { dlm 707 fs/ocfs2/dlm/dlmdomain.c mlog(0, "%s: more migration to do\n", dlm->name); dlm 711 fs/ocfs2/dlm/dlmdomain.c if (!list_empty(&dlm->tracking_list)) { dlm 714 fs/ocfs2/dlm/dlmdomain.c list_for_each_entry(res, &dlm->tracking_list, tracking) dlm 718 fs/ocfs2/dlm/dlmdomain.c dlm_mark_domain_leaving(dlm); dlm 719 fs/ocfs2/dlm/dlmdomain.c dlm_leave_domain(dlm); dlm 720 fs/ocfs2/dlm/dlmdomain.c printk(KERN_NOTICE "o2dlm: Leaving domain %s\n", dlm->name); dlm 721 fs/ocfs2/dlm/dlmdomain.c dlm_force_free_mles(dlm); dlm 722 fs/ocfs2/dlm/dlmdomain.c dlm_complete_dlm_shutdown(dlm); dlm 724 fs/ocfs2/dlm/dlmdomain.c dlm_put(dlm); dlm 798 fs/ocfs2/dlm/dlmdomain.c struct dlm_ctxt *dlm = NULL; dlm 823 fs/ocfs2/dlm/dlmdomain.c dlm = __dlm_lookup_domain_full(query->domain, query->name_len); dlm 824 fs/ocfs2/dlm/dlmdomain.c if (!dlm) dlm 834 fs/ocfs2/dlm/dlmdomain.c if (test_bit(nodenum, dlm->domain_map)) { dlm 850 fs/ocfs2/dlm/dlmdomain.c if (dlm->dlm_state != DLM_CTXT_LEAVING) { dlm 852 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 854 fs/ocfs2/dlm/dlmdomain.c if (dlm->dlm_state == DLM_CTXT_NEW && dlm 855 fs/ocfs2/dlm/dlmdomain.c dlm->joining_node == DLM_LOCK_RES_OWNER_UNKNOWN) { dlm 860 fs/ocfs2/dlm/dlmdomain.c } else if (dlm->joining_node != DLM_LOCK_RES_OWNER_UNKNOWN) { dlm 863 fs/ocfs2/dlm/dlmdomain.c } else if (dlm->reco.state & DLM_RECO_STATE_ACTIVE) { dlm 867 fs/ocfs2/dlm/dlmdomain.c } else if (test_bit(bit, dlm->recovery_map)) { dlm 871 fs/ocfs2/dlm/dlmdomain.c } else if (test_bit(bit, dlm->domain_map)) { dlm 884 fs/ocfs2/dlm/dlmdomain.c &dlm->dlm_locking_proto, dlm 888 fs/ocfs2/dlm/dlmdomain.c &dlm->fs_locking_proto, dlm 895 fs/ocfs2/dlm/dlmdomain.c __dlm_set_joining_node(dlm, query->node_idx); dlm 899 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 915 fs/ocfs2/dlm/dlmdomain.c struct dlm_ctxt *dlm = NULL; dlm 923 fs/ocfs2/dlm/dlmdomain.c dlm = __dlm_lookup_domain_full(assert->domain, assert->name_len); dlm 925 fs/ocfs2/dlm/dlmdomain.c if (dlm) { dlm 926 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 931 fs/ocfs2/dlm/dlmdomain.c BUG_ON(dlm->joining_node != assert->node_idx); dlm 933 fs/ocfs2/dlm/dlmdomain.c if (dlm->reco.state & DLM_RECO_STATE_ACTIVE) { dlm 935 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 940 fs/ocfs2/dlm/dlmdomain.c set_bit(assert->node_idx, dlm->domain_map); dlm 941 fs/ocfs2/dlm/dlmdomain.c clear_bit(assert->node_idx, dlm->exit_domain_map); dlm 942 fs/ocfs2/dlm/dlmdomain.c __dlm_set_joining_node(dlm, DLM_LOCK_RES_OWNER_UNKNOWN); dlm 945 fs/ocfs2/dlm/dlmdomain.c assert->node_idx, dlm->name); dlm 946 fs/ocfs2/dlm/dlmdomain.c __dlm_print_nodes(dlm); dlm 949 fs/ocfs2/dlm/dlmdomain.c dlm_hb_event_notify_attached(dlm, assert->node_idx, 1); dlm 951 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 958 fs/ocfs2/dlm/dlmdomain.c static int dlm_match_regions(struct dlm_ctxt *dlm, dlm 971 fs/ocfs2/dlm/dlmdomain.c qr->qr_domain, qr->qr_node, dlm->node_num); dlm 980 fs/ocfs2/dlm/dlmdomain.c qr->qr_domain, dlm->node_num, qr->qr_node); dlm 1011 fs/ocfs2/dlm/dlmdomain.c dlm->node_num, qr->qr_node); dlm 1034 fs/ocfs2/dlm/dlmdomain.c qr->qr_node, dlm->node_num); dlm 1044 fs/ocfs2/dlm/dlmdomain.c static int dlm_send_regions(struct dlm_ctxt *dlm, unsigned long *node_map) dlm 1060 fs/ocfs2/dlm/dlmdomain.c qr->qr_node = dlm->node_num; dlm 1061 fs/ocfs2/dlm/dlmdomain.c qr->qr_namelen = strlen(dlm->name); dlm 1062 fs/ocfs2/dlm/dlmdomain.c memcpy(qr->qr_domain, dlm->name, qr->qr_namelen); dlm 1075 fs/ocfs2/dlm/dlmdomain.c if (i == dlm->node_num) dlm 1101 fs/ocfs2/dlm/dlmdomain.c struct dlm_ctxt *dlm = NULL; dlm 1118 fs/ocfs2/dlm/dlmdomain.c dlm = __dlm_lookup_domain_full(qr->qr_domain, qr->qr_namelen); dlm 1119 fs/ocfs2/dlm/dlmdomain.c if (!dlm) { dlm 1125 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 1126 fs/ocfs2/dlm/dlmdomain.c if (dlm->joining_node != qr->qr_node) { dlm 1129 fs/ocfs2/dlm/dlmdomain.c dlm->joining_node); dlm 1134 fs/ocfs2/dlm/dlmdomain.c if (dlm->dlm_locking_proto.pv_major == 1 && dlm 1135 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_locking_proto.pv_minor == 0) { dlm 1138 fs/ocfs2/dlm/dlmdomain.c qr->qr_domain, dlm->dlm_locking_proto.pv_major, dlm 1139 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_locking_proto.pv_minor); dlm 1143 fs/ocfs2/dlm/dlmdomain.c status = dlm_match_regions(dlm, qr, local, sizeof(qr->qr_regions)); dlm 1146 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 1156 fs/ocfs2/dlm/dlmdomain.c static int dlm_match_nodes(struct dlm_ctxt *dlm, struct dlm_query_nodeinfo *qn) dlm 1198 fs/ocfs2/dlm/dlmdomain.c qn->qn_nodenum, dlm->node_num); dlm 1205 fs/ocfs2/dlm/dlmdomain.c dlm->node_num, qn->qn_nodenum); dlm 1216 fs/ocfs2/dlm/dlmdomain.c static int dlm_send_nodeinfo(struct dlm_ctxt *dlm, unsigned long *node_map) dlm 1245 fs/ocfs2/dlm/dlmdomain.c qn->qn_nodenum = dlm->node_num; dlm 1247 fs/ocfs2/dlm/dlmdomain.c qn->qn_namelen = strlen(dlm->name); dlm 1248 fs/ocfs2/dlm/dlmdomain.c memcpy(qn->qn_domain, dlm->name, qn->qn_namelen); dlm 1253 fs/ocfs2/dlm/dlmdomain.c if (i == dlm->node_num) dlm 1278 fs/ocfs2/dlm/dlmdomain.c struct dlm_ctxt *dlm = NULL; dlm 1287 fs/ocfs2/dlm/dlmdomain.c dlm = __dlm_lookup_domain_full(qn->qn_domain, qn->qn_namelen); dlm 1288 fs/ocfs2/dlm/dlmdomain.c if (!dlm) { dlm 1294 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 1296 fs/ocfs2/dlm/dlmdomain.c if (dlm->joining_node != qn->qn_nodenum) { dlm 1299 fs/ocfs2/dlm/dlmdomain.c dlm->joining_node); dlm 1304 fs/ocfs2/dlm/dlmdomain.c if (dlm->dlm_locking_proto.pv_major == 1 && dlm 1305 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_locking_proto.pv_minor == 0) { dlm 1308 fs/ocfs2/dlm/dlmdomain.c qn->qn_domain, dlm->dlm_locking_proto.pv_major, dlm 1309 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_locking_proto.pv_minor); dlm 1313 fs/ocfs2/dlm/dlmdomain.c status = dlm_match_nodes(dlm, qn); dlm 1317 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 1327 fs/ocfs2/dlm/dlmdomain.c struct dlm_ctxt *dlm = NULL; dlm 1335 fs/ocfs2/dlm/dlmdomain.c dlm = __dlm_lookup_domain_full(cancel->domain, cancel->name_len); dlm 1337 fs/ocfs2/dlm/dlmdomain.c if (dlm) { dlm 1338 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 1342 fs/ocfs2/dlm/dlmdomain.c BUG_ON(dlm->joining_node != cancel->node_idx); dlm 1343 fs/ocfs2/dlm/dlmdomain.c __dlm_set_joining_node(dlm, DLM_LOCK_RES_OWNER_UNKNOWN); dlm 1345 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 1352 fs/ocfs2/dlm/dlmdomain.c static int dlm_send_one_join_cancel(struct dlm_ctxt *dlm, dlm 1359 fs/ocfs2/dlm/dlmdomain.c cancel_msg.node_idx = dlm->node_num; dlm 1360 fs/ocfs2/dlm/dlmdomain.c cancel_msg.name_len = strlen(dlm->name); dlm 1361 fs/ocfs2/dlm/dlmdomain.c memcpy(cancel_msg.domain, dlm->name, cancel_msg.name_len); dlm 1378 fs/ocfs2/dlm/dlmdomain.c static int dlm_send_join_cancels(struct dlm_ctxt *dlm, dlm 1397 fs/ocfs2/dlm/dlmdomain.c if (node == dlm->node_num) dlm 1400 fs/ocfs2/dlm/dlmdomain.c tmpstat = dlm_send_one_join_cancel(dlm, node); dlm 1414 fs/ocfs2/dlm/dlmdomain.c static int dlm_request_join(struct dlm_ctxt *dlm, dlm 1426 fs/ocfs2/dlm/dlmdomain.c join_msg.node_idx = dlm->node_num; dlm 1427 fs/ocfs2/dlm/dlmdomain.c join_msg.name_len = strlen(dlm->name); dlm 1428 fs/ocfs2/dlm/dlmdomain.c memcpy(join_msg.domain, dlm->name, join_msg.name_len); dlm 1429 fs/ocfs2/dlm/dlmdomain.c join_msg.dlm_proto = dlm->dlm_locking_proto; dlm 1430 fs/ocfs2/dlm/dlmdomain.c join_msg.fs_proto = dlm->fs_locking_proto; dlm 1433 fs/ocfs2/dlm/dlmdomain.c byte_copymap(join_msg.node_map, dlm->live_nodes_map, O2NM_MAX_NODES); dlm 1464 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_locking_proto.pv_major, dlm 1465 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_locking_proto.pv_minor, dlm 1466 fs/ocfs2/dlm/dlmdomain.c dlm->fs_locking_proto.pv_major, dlm 1467 fs/ocfs2/dlm/dlmdomain.c dlm->fs_locking_proto.pv_minor, dlm 1473 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_locking_proto.pv_minor = packet.dlm_minor; dlm 1474 fs/ocfs2/dlm/dlmdomain.c dlm->fs_locking_proto.pv_minor = packet.fs_minor; dlm 1479 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_locking_proto.pv_major, dlm 1480 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_locking_proto.pv_minor, dlm 1481 fs/ocfs2/dlm/dlmdomain.c dlm->fs_locking_proto.pv_major, dlm 1482 fs/ocfs2/dlm/dlmdomain.c dlm->fs_locking_proto.pv_minor); dlm 1501 fs/ocfs2/dlm/dlmdomain.c static int dlm_send_one_join_assert(struct dlm_ctxt *dlm, dlm 1511 fs/ocfs2/dlm/dlmdomain.c assert_msg.node_idx = dlm->node_num; dlm 1512 fs/ocfs2/dlm/dlmdomain.c assert_msg.name_len = strlen(dlm->name); dlm 1513 fs/ocfs2/dlm/dlmdomain.c memcpy(assert_msg.domain, dlm->name, assert_msg.name_len); dlm 1528 fs/ocfs2/dlm/dlmdomain.c static void dlm_send_join_asserts(struct dlm_ctxt *dlm, dlm 1537 fs/ocfs2/dlm/dlmdomain.c if (node == dlm->node_num) dlm 1544 fs/ocfs2/dlm/dlmdomain.c status = dlm_send_one_join_assert(dlm, node); dlm 1546 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 1547 fs/ocfs2/dlm/dlmdomain.c live = test_bit(node, dlm->live_nodes_map); dlm 1548 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 1567 fs/ocfs2/dlm/dlmdomain.c static int dlm_should_restart_join(struct dlm_ctxt *dlm, dlm 1578 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 1581 fs/ocfs2/dlm/dlmdomain.c ret = memcmp(ctxt->live_map, dlm->live_nodes_map, dlm 1582 fs/ocfs2/dlm/dlmdomain.c sizeof(dlm->live_nodes_map)); dlm 1583 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 1591 fs/ocfs2/dlm/dlmdomain.c static int dlm_try_to_join_domain(struct dlm_ctxt *dlm) dlm 1597 fs/ocfs2/dlm/dlmdomain.c mlog(0, "%p", dlm); dlm 1609 fs/ocfs2/dlm/dlmdomain.c o2hb_fill_node_map(dlm->live_nodes_map, sizeof(dlm->live_nodes_map)); dlm 1611 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 1612 fs/ocfs2/dlm/dlmdomain.c memcpy(ctxt->live_map, dlm->live_nodes_map, sizeof(ctxt->live_map)); dlm 1614 fs/ocfs2/dlm/dlmdomain.c __dlm_set_joining_node(dlm, dlm->node_num); dlm 1616 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 1621 fs/ocfs2/dlm/dlmdomain.c if (node == dlm->node_num) dlm 1624 fs/ocfs2/dlm/dlmdomain.c status = dlm_request_join(dlm, node, &response); dlm 1635 fs/ocfs2/dlm/dlmdomain.c if (dlm_should_restart_join(dlm, ctxt, response)) { dlm 1647 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 1648 fs/ocfs2/dlm/dlmdomain.c memcpy(dlm->domain_map, ctxt->yes_resp_map, dlm 1650 fs/ocfs2/dlm/dlmdomain.c set_bit(dlm->node_num, dlm->domain_map); dlm 1651 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 1654 fs/ocfs2/dlm/dlmdomain.c if (dlm->dlm_locking_proto.pv_major > 1 || dlm 1655 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_locking_proto.pv_minor > 0) { dlm 1656 fs/ocfs2/dlm/dlmdomain.c status = dlm_send_nodeinfo(dlm, ctxt->yes_resp_map); dlm 1661 fs/ocfs2/dlm/dlmdomain.c status = dlm_send_regions(dlm, ctxt->yes_resp_map); dlm 1668 fs/ocfs2/dlm/dlmdomain.c dlm_send_join_asserts(dlm, ctxt->yes_resp_map); dlm 1675 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_state = DLM_CTXT_JOINED; dlm 1676 fs/ocfs2/dlm/dlmdomain.c dlm->num_joins++; dlm 1680 fs/ocfs2/dlm/dlmdomain.c spin_lock(&dlm->spinlock); dlm 1681 fs/ocfs2/dlm/dlmdomain.c __dlm_set_joining_node(dlm, DLM_LOCK_RES_OWNER_UNKNOWN); dlm 1683 fs/ocfs2/dlm/dlmdomain.c printk(KERN_NOTICE "o2dlm: Joining domain %s ", dlm->name); dlm 1684 fs/ocfs2/dlm/dlmdomain.c __dlm_print_nodes(dlm); dlm 1686 fs/ocfs2/dlm/dlmdomain.c spin_unlock(&dlm->spinlock); dlm 1691 fs/ocfs2/dlm/dlmdomain.c tmpstat = dlm_send_join_cancels(dlm, dlm 1704 fs/ocfs2/dlm/dlmdomain.c static void dlm_unregister_domain_handlers(struct dlm_ctxt *dlm) dlm 1706 fs/ocfs2/dlm/dlmdomain.c o2hb_unregister_callback(dlm->name, &dlm->dlm_hb_up); dlm 1707 fs/ocfs2/dlm/dlmdomain.c o2hb_unregister_callback(dlm->name, &dlm->dlm_hb_down); dlm 1708 fs/ocfs2/dlm/dlmdomain.c o2net_unregister_handler_list(&dlm->dlm_domain_handlers); dlm 1711 fs/ocfs2/dlm/dlmdomain.c static int dlm_register_domain_handlers(struct dlm_ctxt *dlm) dlm 1717 fs/ocfs2/dlm/dlmdomain.c o2hb_setup_callback(&dlm->dlm_hb_down, O2HB_NODE_DOWN_CB, dlm 1718 fs/ocfs2/dlm/dlmdomain.c dlm_hb_node_down_cb, dlm, DLM_HB_NODE_DOWN_PRI); dlm 1719 fs/ocfs2/dlm/dlmdomain.c o2hb_setup_callback(&dlm->dlm_hb_up, O2HB_NODE_UP_CB, dlm 1720 fs/ocfs2/dlm/dlmdomain.c dlm_hb_node_up_cb, dlm, DLM_HB_NODE_UP_PRI); dlm 1722 fs/ocfs2/dlm/dlmdomain.c status = o2hb_register_callback(dlm->name, &dlm->dlm_hb_down); dlm 1726 fs/ocfs2/dlm/dlmdomain.c status = o2hb_register_callback(dlm->name, &dlm->dlm_hb_up); dlm 1730 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_MASTER_REQUEST_MSG, dlm->key, dlm 1733 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1737 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_ASSERT_MASTER_MSG, dlm->key, dlm 1740 fs/ocfs2/dlm/dlmdomain.c dlm, dlm_assert_master_post_handler, dlm 1741 fs/ocfs2/dlm/dlmdomain.c &dlm->dlm_domain_handlers); dlm 1745 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_CREATE_LOCK_MSG, dlm->key, dlm 1748 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1752 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_CONVERT_LOCK_MSG, dlm->key, dlm 1755 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1759 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_UNLOCK_LOCK_MSG, dlm->key, dlm 1762 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1766 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_PROXY_AST_MSG, dlm->key, dlm 1769 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1773 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_EXIT_DOMAIN_MSG, dlm->key, dlm 1776 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1780 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_DEREF_LOCKRES_MSG, dlm->key, dlm 1783 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1787 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_MIGRATE_REQUEST_MSG, dlm->key, dlm 1790 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1794 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_MIG_LOCKRES_MSG, dlm->key, dlm 1797 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1801 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_MASTER_REQUERY_MSG, dlm->key, dlm 1804 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1808 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_LOCK_REQUEST_MSG, dlm->key, dlm 1811 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1815 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_RECO_DATA_DONE_MSG, dlm->key, dlm 1818 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1822 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_BEGIN_RECO_MSG, dlm->key, dlm 1825 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1829 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_FINALIZE_RECO_MSG, dlm->key, dlm 1832 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1836 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_BEGIN_EXIT_DOMAIN_MSG, dlm->key, dlm 1839 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1843 fs/ocfs2/dlm/dlmdomain.c status = o2net_register_handler(DLM_DEREF_LOCKRES_DONE, dlm->key, dlm 1846 fs/ocfs2/dlm/dlmdomain.c dlm, NULL, &dlm->dlm_domain_handlers); dlm 1849 fs/ocfs2/dlm/dlmdomain.c dlm_unregister_domain_handlers(dlm); dlm 1854 fs/ocfs2/dlm/dlmdomain.c static int dlm_join_domain(struct dlm_ctxt *dlm) dlm 1861 fs/ocfs2/dlm/dlmdomain.c BUG_ON(!dlm); dlm 1863 fs/ocfs2/dlm/dlmdomain.c mlog(0, "Join domain %s\n", dlm->name); dlm 1865 fs/ocfs2/dlm/dlmdomain.c status = dlm_register_domain_handlers(dlm); dlm 1871 fs/ocfs2/dlm/dlmdomain.c status = dlm_launch_thread(dlm); dlm 1877 fs/ocfs2/dlm/dlmdomain.c status = dlm_launch_recovery_thread(dlm); dlm 1883 fs/ocfs2/dlm/dlmdomain.c dlm_debug_init(dlm); dlm 1885 fs/ocfs2/dlm/dlmdomain.c snprintf(wq_name, O2NM_MAX_NAME_LEN, "dlm_wq-%s", dlm->name); dlm 1886 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_worker = alloc_workqueue(wq_name, WQ_MEM_RECLAIM, 0); dlm 1887 fs/ocfs2/dlm/dlmdomain.c if (!dlm->dlm_worker) { dlm 1894 fs/ocfs2/dlm/dlmdomain.c status = dlm_try_to_join_domain(dlm); dlm 1909 fs/ocfs2/dlm/dlmdomain.c "%s after %u msecs\n", dlm->name, dlm 1939 fs/ocfs2/dlm/dlmdomain.c dlm_unregister_domain_handlers(dlm); dlm 1940 fs/ocfs2/dlm/dlmdomain.c dlm_complete_thread(dlm); dlm 1941 fs/ocfs2/dlm/dlmdomain.c dlm_complete_recovery_thread(dlm); dlm 1942 fs/ocfs2/dlm/dlmdomain.c dlm_destroy_dlm_worker(dlm); dlm 1953 fs/ocfs2/dlm/dlmdomain.c struct dlm_ctxt *dlm = NULL; dlm 1955 fs/ocfs2/dlm/dlmdomain.c dlm = kzalloc(sizeof(*dlm), GFP_KERNEL); dlm 1956 fs/ocfs2/dlm/dlmdomain.c if (!dlm) { dlm 1962 fs/ocfs2/dlm/dlmdomain.c dlm->name = kstrdup(domain, GFP_KERNEL); dlm 1963 fs/ocfs2/dlm/dlmdomain.c if (dlm->name == NULL) { dlm 1969 fs/ocfs2/dlm/dlmdomain.c dlm->lockres_hash = (struct hlist_head **)dlm_alloc_pagevec(DLM_HASH_PAGES); dlm 1970 fs/ocfs2/dlm/dlmdomain.c if (!dlm->lockres_hash) { dlm 1977 fs/ocfs2/dlm/dlmdomain.c INIT_HLIST_HEAD(dlm_lockres_hash(dlm, i)); dlm 1979 fs/ocfs2/dlm/dlmdomain.c dlm->master_hash = (struct hlist_head **) dlm 1981 fs/ocfs2/dlm/dlmdomain.c if (!dlm->master_hash) { dlm 1988 fs/ocfs2/dlm/dlmdomain.c INIT_HLIST_HEAD(dlm_master_hash(dlm, i)); dlm 1990 fs/ocfs2/dlm/dlmdomain.c dlm->key = key; dlm 1991 fs/ocfs2/dlm/dlmdomain.c dlm->node_num = o2nm_this_node(); dlm 1993 fs/ocfs2/dlm/dlmdomain.c dlm_create_debugfs_subroot(dlm); dlm 1995 fs/ocfs2/dlm/dlmdomain.c spin_lock_init(&dlm->spinlock); dlm 1996 fs/ocfs2/dlm/dlmdomain.c spin_lock_init(&dlm->master_lock); dlm 1997 fs/ocfs2/dlm/dlmdomain.c spin_lock_init(&dlm->ast_lock); dlm 1998 fs/ocfs2/dlm/dlmdomain.c spin_lock_init(&dlm->track_lock); dlm 1999 fs/ocfs2/dlm/dlmdomain.c INIT_LIST_HEAD(&dlm->list); dlm 2000 fs/ocfs2/dlm/dlmdomain.c INIT_LIST_HEAD(&dlm->dirty_list); dlm 2001 fs/ocfs2/dlm/dlmdomain.c INIT_LIST_HEAD(&dlm->reco.resources); dlm 2002 fs/ocfs2/dlm/dlmdomain.c INIT_LIST_HEAD(&dlm->reco.node_data); dlm 2003 fs/ocfs2/dlm/dlmdomain.c INIT_LIST_HEAD(&dlm->purge_list); dlm 2004 fs/ocfs2/dlm/dlmdomain.c INIT_LIST_HEAD(&dlm->dlm_domain_handlers); dlm 2005 fs/ocfs2/dlm/dlmdomain.c INIT_LIST_HEAD(&dlm->tracking_list); dlm 2006 fs/ocfs2/dlm/dlmdomain.c dlm->reco.state = 0; dlm 2008 fs/ocfs2/dlm/dlmdomain.c INIT_LIST_HEAD(&dlm->pending_asts); dlm 2009 fs/ocfs2/dlm/dlmdomain.c INIT_LIST_HEAD(&dlm->pending_basts); dlm 2012 fs/ocfs2/dlm/dlmdomain.c dlm->recovery_map, &(dlm->recovery_map[0])); dlm 2014 fs/ocfs2/dlm/dlmdomain.c memset(dlm->recovery_map, 0, sizeof(dlm->recovery_map)); dlm 2015 fs/ocfs2/dlm/dlmdomain.c memset(dlm->live_nodes_map, 0, sizeof(dlm->live_nodes_map)); dlm 2016 fs/ocfs2/dlm/dlmdomain.c memset(dlm->domain_map, 0, sizeof(dlm->domain_map)); dlm 2018 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_thread_task = NULL; dlm 2019 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_reco_thread_task = NULL; dlm 2020 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_worker = NULL; dlm 2021 fs/ocfs2/dlm/dlmdomain.c init_waitqueue_head(&dlm->dlm_thread_wq); dlm 2022 fs/ocfs2/dlm/dlmdomain.c init_waitqueue_head(&dlm->dlm_reco_thread_wq); dlm 2023 fs/ocfs2/dlm/dlmdomain.c init_waitqueue_head(&dlm->reco.event); dlm 2024 fs/ocfs2/dlm/dlmdomain.c init_waitqueue_head(&dlm->ast_wq); dlm 2025 fs/ocfs2/dlm/dlmdomain.c init_waitqueue_head(&dlm->migration_wq); dlm 2026 fs/ocfs2/dlm/dlmdomain.c INIT_LIST_HEAD(&dlm->mle_hb_events); dlm 2028 fs/ocfs2/dlm/dlmdomain.c dlm->joining_node = DLM_LOCK_RES_OWNER_UNKNOWN; dlm 2029 fs/ocfs2/dlm/dlmdomain.c init_waitqueue_head(&dlm->dlm_join_events); dlm 2031 fs/ocfs2/dlm/dlmdomain.c dlm->migrate_done = 0; dlm 2033 fs/ocfs2/dlm/dlmdomain.c dlm->reco.new_master = O2NM_INVALID_NODE_NUM; dlm 2034 fs/ocfs2/dlm/dlmdomain.c dlm->reco.dead_node = O2NM_INVALID_NODE_NUM; dlm 2036 fs/ocfs2/dlm/dlmdomain.c atomic_set(&dlm->res_tot_count, 0); dlm 2037 fs/ocfs2/dlm/dlmdomain.c atomic_set(&dlm->res_cur_count, 0); dlm 2039 fs/ocfs2/dlm/dlmdomain.c atomic_set(&dlm->mle_tot_count[i], 0); dlm 2040 fs/ocfs2/dlm/dlmdomain.c atomic_set(&dlm->mle_cur_count[i], 0); dlm 2043 fs/ocfs2/dlm/dlmdomain.c spin_lock_init(&dlm->work_lock); dlm 2044 fs/ocfs2/dlm/dlmdomain.c INIT_LIST_HEAD(&dlm->work_list); dlm 2045 fs/ocfs2/dlm/dlmdomain.c INIT_WORK(&dlm->dispatched_work, dlm_dispatch_work); dlm 2047 fs/ocfs2/dlm/dlmdomain.c kref_init(&dlm->dlm_refs); dlm 2048 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_state = DLM_CTXT_NEW; dlm 2050 fs/ocfs2/dlm/dlmdomain.c INIT_LIST_HEAD(&dlm->dlm_eviction_callbacks); dlm 2053 fs/ocfs2/dlm/dlmdomain.c kref_read(&dlm->dlm_refs)); dlm 2057 fs/ocfs2/dlm/dlmdomain.c if (ret < 0 && dlm) { dlm 2058 fs/ocfs2/dlm/dlmdomain.c if (dlm->master_hash) dlm 2059 fs/ocfs2/dlm/dlmdomain.c dlm_free_pagevec((void **)dlm->master_hash, dlm 2062 fs/ocfs2/dlm/dlmdomain.c if (dlm->lockres_hash) dlm 2063 fs/ocfs2/dlm/dlmdomain.c dlm_free_pagevec((void **)dlm->lockres_hash, dlm 2066 fs/ocfs2/dlm/dlmdomain.c kfree(dlm->name); dlm 2067 fs/ocfs2/dlm/dlmdomain.c kfree(dlm); dlm 2068 fs/ocfs2/dlm/dlmdomain.c dlm = NULL; dlm 2070 fs/ocfs2/dlm/dlmdomain.c return dlm; dlm 2108 fs/ocfs2/dlm/dlmdomain.c struct dlm_ctxt *dlm = NULL; dlm 2120 fs/ocfs2/dlm/dlmdomain.c dlm = NULL; dlm 2129 fs/ocfs2/dlm/dlmdomain.c dlm = __dlm_lookup_domain(domain); dlm 2130 fs/ocfs2/dlm/dlmdomain.c if (dlm) { dlm 2131 fs/ocfs2/dlm/dlmdomain.c if (dlm->dlm_state != DLM_CTXT_JOINED) { dlm 2141 fs/ocfs2/dlm/dlmdomain.c if (dlm_protocol_compare(&dlm->fs_locking_proto, fs_proto)) { dlm 2151 fs/ocfs2/dlm/dlmdomain.c __dlm_get(dlm); dlm 2152 fs/ocfs2/dlm/dlmdomain.c dlm->num_joins++; dlm 2174 fs/ocfs2/dlm/dlmdomain.c dlm = new_ctxt; dlm 2178 fs/ocfs2/dlm/dlmdomain.c list_add_tail(&dlm->list, &dlm_domains); dlm 2185 fs/ocfs2/dlm/dlmdomain.c dlm->dlm_locking_proto = dlm_protocol; dlm 2186 fs/ocfs2/dlm/dlmdomain.c dlm->fs_locking_proto = *fs_proto; dlm 2188 fs/ocfs2/dlm/dlmdomain.c ret = dlm_join_domain(dlm); dlm 2191 fs/ocfs2/dlm/dlmdomain.c dlm_put(dlm); dlm 2196 fs/ocfs2/dlm/dlmdomain.c *fs_proto = dlm->fs_locking_proto; dlm 2204 fs/ocfs2/dlm/dlmdomain.c dlm = ERR_PTR(ret); dlm 2206 fs/ocfs2/dlm/dlmdomain.c return dlm; dlm 2274 fs/ocfs2/dlm/dlmdomain.c void dlm_fire_domain_eviction_callbacks(struct dlm_ctxt *dlm, dlm 2280 fs/ocfs2/dlm/dlmdomain.c list_for_each_entry(cb, &dlm->dlm_eviction_callbacks, ec_item) { dlm 2296 fs/ocfs2/dlm/dlmdomain.c void dlm_register_eviction_cb(struct dlm_ctxt *dlm, dlm 2300 fs/ocfs2/dlm/dlmdomain.c list_add_tail(&cb->ec_item, &dlm->dlm_eviction_callbacks); dlm 16 fs/ocfs2/dlm/dlmdomain.h static inline int dlm_joined(struct dlm_ctxt *dlm) dlm 21 fs/ocfs2/dlm/dlmdomain.h if (dlm->dlm_state == DLM_CTXT_JOINED) dlm 28 fs/ocfs2/dlm/dlmdomain.h static inline int dlm_shutting_down(struct dlm_ctxt *dlm) dlm 33 fs/ocfs2/dlm/dlmdomain.h if (dlm->dlm_state == DLM_CTXT_IN_SHUTDOWN) dlm 40 fs/ocfs2/dlm/dlmdomain.h void dlm_fire_domain_eviction_callbacks(struct dlm_ctxt *dlm, dlm 45 fs/ocfs2/dlm/dlmlock.c static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm, dlm 103 fs/ocfs2/dlm/dlmlock.c static enum dlm_status dlmlock_master(struct dlm_ctxt *dlm, dlm 117 fs/ocfs2/dlm/dlmlock.c lock->ml.node != dlm->node_num) { dlm 145 fs/ocfs2/dlm/dlmlock.c "node %u for reco lock\n", dlm->name, dlm 156 fs/ocfs2/dlm/dlmlock.c "node %u for reco lock\n", dlm->name, dlm 172 fs/ocfs2/dlm/dlmlock.c dlm_queue_ast(dlm, lock); dlm 174 fs/ocfs2/dlm/dlmlock.c dlm_lockres_release_ast(dlm, res); dlm 176 fs/ocfs2/dlm/dlmlock.c dlm_lockres_calc_usage(dlm, res); dlm 178 fs/ocfs2/dlm/dlmlock.c dlm_kick_thread(dlm, res); dlm 199 fs/ocfs2/dlm/dlmlock.c static enum dlm_status dlmlock_remote(struct dlm_ctxt *dlm, dlm 216 fs/ocfs2/dlm/dlmlock.c if (res->owner == dlm->node_num) { dlm 230 fs/ocfs2/dlm/dlmlock.c status = dlm_send_remote_lock_request(dlm, res, lock, flags); dlm 244 fs/ocfs2/dlm/dlmlock.c dlm->name, res->owner); dlm 265 fs/ocfs2/dlm/dlmlock.c dlm->name, dlm->node_num, res->owner); dlm 271 fs/ocfs2/dlm/dlmlock.c dlm_lockres_calc_usage(dlm, res); dlm 285 fs/ocfs2/dlm/dlmlock.c static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm, dlm 294 fs/ocfs2/dlm/dlmlock.c create.node_idx = dlm->node_num; dlm 301 fs/ocfs2/dlm/dlmlock.c tmpret = o2net_send_message(DLM_CREATE_LOCK_MSG, dlm->key, &create, dlm 308 fs/ocfs2/dlm/dlmlock.c "currently.\n", dlm->name, create.namelen, dlm 315 fs/ocfs2/dlm/dlmlock.c "node %u\n", dlm->name, create.namelen, create.name, dlm 445 fs/ocfs2/dlm/dlmlock.c struct dlm_ctxt *dlm = data; dlm 454 fs/ocfs2/dlm/dlmlock.c BUG_ON(!dlm); dlm 456 fs/ocfs2/dlm/dlmlock.c if (!dlm_grab(dlm)) dlm 462 fs/ocfs2/dlm/dlmlock.c if (!dlm_domain_fully_joined(dlm)) { dlm 465 fs/ocfs2/dlm/dlmlock.c dlm->name, create->node_idx, namelen, name); dlm 493 fs/ocfs2/dlm/dlmlock.c res = dlm_lookup_lockres(dlm, name, namelen); dlm 510 fs/ocfs2/dlm/dlmlock.c status = dlmlock_master(dlm, res, newlock, be32_to_cpu(create->flags)); dlm 519 fs/ocfs2/dlm/dlmlock.c dlm_put(dlm); dlm 542 fs/ocfs2/dlm/dlmlock.c enum dlm_status dlmlock(struct dlm_ctxt *dlm, int mode, dlm 619 fs/ocfs2/dlm/dlmlock.c dlm_wait_for_recovery(dlm); dlm 621 fs/ocfs2/dlm/dlmlock.c if (res->owner == dlm->node_num) dlm 622 fs/ocfs2/dlm/dlmlock.c status = dlmconvert_master(dlm, res, lock, flags, mode); dlm 624 fs/ocfs2/dlm/dlmlock.c status = dlmconvert_remote(dlm, res, lock, flags, mode); dlm 652 fs/ocfs2/dlm/dlmlock.c dlm_get_next_cookie(dlm->node_num, &tmpcookie); dlm 653 fs/ocfs2/dlm/dlmlock.c lock = dlm_new_lock(mode, dlm->node_num, tmpcookie, lksb); dlm 660 fs/ocfs2/dlm/dlmlock.c dlm_wait_for_recovery(dlm); dlm 663 fs/ocfs2/dlm/dlmlock.c res = dlm_get_lock_resource(dlm, name, namelen, flags); dlm 692 fs/ocfs2/dlm/dlmlock.c if (res->owner == dlm->node_num) dlm 693 fs/ocfs2/dlm/dlmlock.c status = dlmlock_master(dlm, res, lock, flags); dlm 695 fs/ocfs2/dlm/dlmlock.c status = dlmlock_remote(dlm, res, lock, flags); dlm 706 fs/ocfs2/dlm/dlmlock.c dlm_wait_for_node_death(dlm, res->owner, dlm 709 fs/ocfs2/dlm/dlmlock.c dlm_wait_for_recovery(dlm); dlm 716 fs/ocfs2/dlm/dlmlock.c dlm_lockres_drop_inflight_ref(dlm, res); dlm 719 fs/ocfs2/dlm/dlmlock.c dlm_lockres_calc_usage(dlm, res); dlm 720 fs/ocfs2/dlm/dlmlock.c dlm_kick_thread(dlm, res); dlm 40 fs/ocfs2/dlm/dlmmaster.c static void dlm_mle_node_down(struct dlm_ctxt *dlm, dlm 44 fs/ocfs2/dlm/dlmmaster.c static void dlm_mle_node_up(struct dlm_ctxt *dlm, dlm 50 fs/ocfs2/dlm/dlmmaster.c static int dlm_do_assert_master(struct dlm_ctxt *dlm, dlm 55 fs/ocfs2/dlm/dlmmaster.c static inline int dlm_mle_equal(struct dlm_ctxt *dlm, dlm 60 fs/ocfs2/dlm/dlmmaster.c if (dlm != mle->dlm) dlm 77 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm, dlm 83 fs/ocfs2/dlm/dlmmaster.c static int dlm_find_mle(struct dlm_ctxt *dlm, dlm 91 fs/ocfs2/dlm/dlmmaster.c static int dlm_wait_for_lock_mastery(struct dlm_ctxt *dlm, dlm 95 fs/ocfs2/dlm/dlmmaster.c static int dlm_restart_lock_mastery(struct dlm_ctxt *dlm, dlm 99 fs/ocfs2/dlm/dlmmaster.c static int dlm_add_migration_mle(struct dlm_ctxt *dlm, dlm 106 fs/ocfs2/dlm/dlmmaster.c static u8 dlm_pick_migration_target(struct dlm_ctxt *dlm, dlm 108 fs/ocfs2/dlm/dlmmaster.c static void dlm_remove_nonlocal_locks(struct dlm_ctxt *dlm, dlm 110 fs/ocfs2/dlm/dlmmaster.c static int dlm_mark_lockres_migrating(struct dlm_ctxt *dlm, dlm 113 fs/ocfs2/dlm/dlmmaster.c static int dlm_pre_master_reco_lockres(struct dlm_ctxt *dlm, dlm 163 fs/ocfs2/dlm/dlmmaster.c static inline void __dlm_mle_attach_hb_events(struct dlm_ctxt *dlm, dlm 166 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->spinlock); dlm 168 fs/ocfs2/dlm/dlmmaster.c list_add_tail(&mle->hb_events, &dlm->mle_hb_events); dlm 172 fs/ocfs2/dlm/dlmmaster.c static inline void __dlm_mle_detach_hb_events(struct dlm_ctxt *dlm, dlm 180 fs/ocfs2/dlm/dlmmaster.c static inline void dlm_mle_detach_hb_events(struct dlm_ctxt *dlm, dlm 183 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 184 fs/ocfs2/dlm/dlmmaster.c __dlm_mle_detach_hb_events(dlm, mle); dlm 185 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 190 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm; dlm 191 fs/ocfs2/dlm/dlmmaster.c dlm = mle->dlm; dlm 193 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->spinlock); dlm 194 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->master_lock); dlm 201 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm; dlm 202 fs/ocfs2/dlm/dlmmaster.c dlm = mle->dlm; dlm 204 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 205 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->master_lock); dlm 208 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 209 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 216 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm; dlm 217 fs/ocfs2/dlm/dlmmaster.c dlm = mle->dlm; dlm 219 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->spinlock); dlm 220 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->master_lock); dlm 235 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm; dlm 236 fs/ocfs2/dlm/dlmmaster.c dlm = mle->dlm; dlm 238 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 239 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->master_lock); dlm 241 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 242 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 252 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm, dlm 257 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->spinlock); dlm 259 fs/ocfs2/dlm/dlmmaster.c mle->dlm = dlm; dlm 291 fs/ocfs2/dlm/dlmmaster.c atomic_inc(&dlm->mle_tot_count[mle->type]); dlm 292 fs/ocfs2/dlm/dlmmaster.c atomic_inc(&dlm->mle_cur_count[mle->type]); dlm 295 fs/ocfs2/dlm/dlmmaster.c memcpy(mle->node_map, dlm->domain_map, sizeof(mle->node_map)); dlm 296 fs/ocfs2/dlm/dlmmaster.c memcpy(mle->vote_map, dlm->domain_map, sizeof(mle->vote_map)); dlm 297 fs/ocfs2/dlm/dlmmaster.c clear_bit(dlm->node_num, mle->vote_map); dlm 298 fs/ocfs2/dlm/dlmmaster.c clear_bit(dlm->node_num, mle->node_map); dlm 301 fs/ocfs2/dlm/dlmmaster.c __dlm_mle_attach_hb_events(dlm, mle); dlm 304 fs/ocfs2/dlm/dlmmaster.c void __dlm_unlink_mle(struct dlm_ctxt *dlm, struct dlm_master_list_entry *mle) dlm 306 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->spinlock); dlm 307 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->master_lock); dlm 313 fs/ocfs2/dlm/dlmmaster.c void __dlm_insert_mle(struct dlm_ctxt *dlm, struct dlm_master_list_entry *mle) dlm 317 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->master_lock); dlm 319 fs/ocfs2/dlm/dlmmaster.c bucket = dlm_master_hash(dlm, mle->mnamehash); dlm 324 fs/ocfs2/dlm/dlmmaster.c static int dlm_find_mle(struct dlm_ctxt *dlm, dlm 332 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->master_lock); dlm 335 fs/ocfs2/dlm/dlmmaster.c bucket = dlm_master_hash(dlm, hash); dlm 337 fs/ocfs2/dlm/dlmmaster.c if (!dlm_mle_equal(dlm, tmpmle, name, namelen)) dlm 346 fs/ocfs2/dlm/dlmmaster.c void dlm_hb_event_notify_attached(struct dlm_ctxt *dlm, int idx, int node_up) dlm 350 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->spinlock); dlm 352 fs/ocfs2/dlm/dlmmaster.c list_for_each_entry(mle, &dlm->mle_hb_events, hb_events) { dlm 354 fs/ocfs2/dlm/dlmmaster.c dlm_mle_node_up(dlm, mle, NULL, idx); dlm 356 fs/ocfs2/dlm/dlmmaster.c dlm_mle_node_down(dlm, mle, NULL, idx); dlm 360 fs/ocfs2/dlm/dlmmaster.c static void dlm_mle_node_down(struct dlm_ctxt *dlm, dlm 374 fs/ocfs2/dlm/dlmmaster.c static void dlm_mle_node_up(struct dlm_ctxt *dlm, dlm 408 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm; dlm 411 fs/ocfs2/dlm/dlmmaster.c dlm = mle->dlm; dlm 413 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->spinlock); dlm 414 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->master_lock); dlm 420 fs/ocfs2/dlm/dlmmaster.c __dlm_unlink_mle(dlm, mle); dlm 423 fs/ocfs2/dlm/dlmmaster.c __dlm_mle_detach_hb_events(dlm, mle); dlm 425 fs/ocfs2/dlm/dlmmaster.c atomic_dec(&dlm->mle_cur_count[mle->type]); dlm 469 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm; dlm 472 fs/ocfs2/dlm/dlmmaster.c dlm = res->dlm; dlm 481 fs/ocfs2/dlm/dlmmaster.c atomic_dec(&dlm->res_cur_count); dlm 525 fs/ocfs2/dlm/dlmmaster.c static void dlm_init_lockres(struct dlm_ctxt *dlm, dlm 556 fs/ocfs2/dlm/dlmmaster.c res->dlm = dlm; dlm 560 fs/ocfs2/dlm/dlmmaster.c atomic_inc(&dlm->res_tot_count); dlm 561 fs/ocfs2/dlm/dlmmaster.c atomic_inc(&dlm->res_cur_count); dlm 565 fs/ocfs2/dlm/dlmmaster.c dlm_set_lockres_owner(dlm, res, DLM_LOCK_RES_OWNER_UNKNOWN); dlm 572 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->track_lock); dlm 573 fs/ocfs2/dlm/dlmmaster.c list_add_tail(&res->tracking, &dlm->tracking_list); dlm 574 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->track_lock); dlm 580 fs/ocfs2/dlm/dlmmaster.c struct dlm_lock_resource *dlm_new_lockres(struct dlm_ctxt *dlm, dlm 594 fs/ocfs2/dlm/dlmmaster.c dlm_init_lockres(dlm, res, name, namelen); dlm 603 fs/ocfs2/dlm/dlmmaster.c void dlm_lockres_set_refmap_bit(struct dlm_ctxt *dlm, dlm 614 fs/ocfs2/dlm/dlmmaster.c void dlm_lockres_clear_refmap_bit(struct dlm_ctxt *dlm, dlm 625 fs/ocfs2/dlm/dlmmaster.c static void __dlm_lockres_grab_inflight_ref(struct dlm_ctxt *dlm, dlm 630 fs/ocfs2/dlm/dlmmaster.c mlog(0, "%s: res %.*s, inflight++: now %u, %ps()\n", dlm->name, dlm 635 fs/ocfs2/dlm/dlmmaster.c void dlm_lockres_grab_inflight_ref(struct dlm_ctxt *dlm, dlm 639 fs/ocfs2/dlm/dlmmaster.c __dlm_lockres_grab_inflight_ref(dlm, res); dlm 642 fs/ocfs2/dlm/dlmmaster.c void dlm_lockres_drop_inflight_ref(struct dlm_ctxt *dlm, dlm 651 fs/ocfs2/dlm/dlmmaster.c mlog(0, "%s: res %.*s, inflight--: now %u, %ps()\n", dlm->name, dlm 658 fs/ocfs2/dlm/dlmmaster.c void __dlm_lockres_grab_inflight_worker(struct dlm_ctxt *dlm, dlm 664 fs/ocfs2/dlm/dlmmaster.c dlm->name, res->lockname.len, res->lockname.name, dlm 668 fs/ocfs2/dlm/dlmmaster.c static void __dlm_lockres_drop_inflight_worker(struct dlm_ctxt *dlm, dlm 675 fs/ocfs2/dlm/dlmmaster.c dlm->name, res->lockname.len, res->lockname.name, dlm 679 fs/ocfs2/dlm/dlmmaster.c static void dlm_lockres_drop_inflight_worker(struct dlm_ctxt *dlm, dlm 683 fs/ocfs2/dlm/dlmmaster.c __dlm_lockres_drop_inflight_worker(dlm, res); dlm 703 fs/ocfs2/dlm/dlmmaster.c struct dlm_lock_resource * dlm_get_lock_resource(struct dlm_ctxt *dlm, dlm 725 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 726 fs/ocfs2/dlm/dlmmaster.c tmpres = __dlm_lookup_lockres_full(dlm, lockid, namelen, hash); dlm 728 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 755 fs/ocfs2/dlm/dlmmaster.c BUG_ON(tmpres->owner == dlm->node_num); dlm 765 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_grab_inflight_ref(dlm, tmpres); dlm 769 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->track_lock); dlm 777 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->track_lock); dlm 785 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 791 fs/ocfs2/dlm/dlmmaster.c res = dlm_new_lockres(dlm, lockid, namelen); dlm 803 fs/ocfs2/dlm/dlmmaster.c dlm_change_lockres_owner(dlm, res, dlm->node_num); dlm 804 fs/ocfs2/dlm/dlmmaster.c __dlm_insert_lockres(dlm, res); dlm 805 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_grab_inflight_ref(dlm, res); dlm 807 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 813 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->master_lock); dlm 816 fs/ocfs2/dlm/dlmmaster.c blocked = dlm_find_mle(dlm, &mle, (char *)lockid, namelen); dlm 833 fs/ocfs2/dlm/dlmmaster.c BUG_ON(mig && mle->master == dlm->node_num); dlm 837 fs/ocfs2/dlm/dlmmaster.c dlm->name, namelen, lockid, dlm 839 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 840 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 844 fs/ocfs2/dlm/dlmmaster.c dlm_mle_detach_hb_events(dlm, mle); dlm 858 fs/ocfs2/dlm/dlmmaster.c dlm_init_mle(mle, DLM_MLE_MASTER, dlm, res, NULL, 0); dlm 859 fs/ocfs2/dlm/dlmmaster.c set_bit(dlm->node_num, mle->maybe_map); dlm 860 fs/ocfs2/dlm/dlmmaster.c __dlm_insert_mle(dlm, mle); dlm 866 fs/ocfs2/dlm/dlmmaster.c bit = find_next_bit(dlm->recovery_map, O2NM_MAX_NODES, 0); dlm 870 fs/ocfs2/dlm/dlmmaster.c dlm->name, namelen, (char *)lockid, bit); dlm 881 fs/ocfs2/dlm/dlmmaster.c __dlm_insert_lockres(dlm, res); dlm 884 fs/ocfs2/dlm/dlmmaster.c __dlm_lockres_grab_inflight_ref(dlm, res); dlm 891 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 892 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 901 fs/ocfs2/dlm/dlmmaster.c "master $RECOVERY lock now\n", dlm->name); dlm 902 fs/ocfs2/dlm/dlmmaster.c if (!dlm_pre_master_reco_lockres(dlm, res)) dlm 906 fs/ocfs2/dlm/dlmmaster.c "change\n", dlm->name); dlm 912 fs/ocfs2/dlm/dlmmaster.c dlm_kick_recovery_thread(dlm); dlm 914 fs/ocfs2/dlm/dlmmaster.c dlm_wait_for_recovery(dlm); dlm 916 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 917 fs/ocfs2/dlm/dlmmaster.c bit = find_next_bit(dlm->recovery_map, O2NM_MAX_NODES, 0); dlm 921 fs/ocfs2/dlm/dlmmaster.c dlm->name, namelen, (char *)lockid, bit); dlm 925 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 928 fs/ocfs2/dlm/dlmmaster.c dlm_wait_for_node_recovery(dlm, bit, 10000); dlm 950 fs/ocfs2/dlm/dlmmaster.c "master is %u, keep going\n", dlm->name, namelen, dlm 957 fs/ocfs2/dlm/dlmmaster.c ret = dlm_wait_for_lock_mastery(dlm, res, mle, &blocked); dlm 961 fs/ocfs2/dlm/dlmmaster.c "request now, blocked=%d\n", dlm->name, res->lockname.len, dlm 966 fs/ocfs2/dlm/dlmmaster.c dlm->name, res->lockname.len, dlm 975 fs/ocfs2/dlm/dlmmaster.c mlog(0, "%s: res %.*s, Mastered by %u\n", dlm->name, res->lockname.len, dlm 981 fs/ocfs2/dlm/dlmmaster.c dlm_mle_detach_hb_events(dlm, mle); dlm 1003 fs/ocfs2/dlm/dlmmaster.c static int dlm_wait_for_lock_mastery(struct dlm_ctxt *dlm, dlm 1020 fs/ocfs2/dlm/dlmmaster.c mlog(0, "%s:%.*s: owner is suddenly %u\n", dlm->name, dlm 1025 fs/ocfs2/dlm/dlmmaster.c if (res->owner != dlm->node_num) { dlm 1050 fs/ocfs2/dlm/dlmmaster.c dlm->name, res->lockname.len, res->lockname.name); dlm 1051 fs/ocfs2/dlm/dlmmaster.c ret = dlm_restart_lock_mastery(dlm, res, mle, *blocked); dlm 1055 fs/ocfs2/dlm/dlmmaster.c dlm->name, res->lockname.len, res->lockname.name, dlm 1065 fs/ocfs2/dlm/dlmmaster.c "rechecking now\n", dlm->name, res->lockname.len, dlm 1071 fs/ocfs2/dlm/dlmmaster.c "for %s:%.*s\n", dlm->name, res->lockname.len, dlm 1085 fs/ocfs2/dlm/dlmmaster.c if (dlm->node_num <= bit) { dlm 1089 fs/ocfs2/dlm/dlmmaster.c mle->master = dlm->node_num; dlm 1110 fs/ocfs2/dlm/dlmmaster.c mlog(0, "%s:%.*s: waiting again\n", dlm->name, dlm 1121 fs/ocfs2/dlm/dlmmaster.c m = dlm->node_num; dlm 1124 fs/ocfs2/dlm/dlmmaster.c ret = dlm_do_assert_master(dlm, res, mle->vote_map, 0); dlm 1142 fs/ocfs2/dlm/dlmmaster.c dlm_change_lockres_owner(dlm, res, m); dlm 1208 fs/ocfs2/dlm/dlmmaster.c static int dlm_restart_lock_mastery(struct dlm_ctxt *dlm, dlm 1255 fs/ocfs2/dlm/dlmmaster.c "now\n", dlm->name, dlm 1271 fs/ocfs2/dlm/dlmmaster.c dlm->name, dlm 1289 fs/ocfs2/dlm/dlmmaster.c set_bit(dlm->node_num, mle->maybe_map); dlm 1311 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm = mle->dlm; dlm 1316 fs/ocfs2/dlm/dlmmaster.c request.node_idx = dlm->node_num; dlm 1324 fs/ocfs2/dlm/dlmmaster.c ret = o2net_send_message(DLM_MASTER_REQUEST_MSG, dlm->key, &request, dlm 1360 fs/ocfs2/dlm/dlmmaster.c "reference\n", dlm->name, res->lockname.len, dlm 1406 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm = data; dlm 1417 fs/ocfs2/dlm/dlmmaster.c if (!dlm_grab(dlm)) dlm 1420 fs/ocfs2/dlm/dlmmaster.c if (!dlm_domain_fully_joined(dlm)) { dlm 1435 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 1436 fs/ocfs2/dlm/dlmmaster.c res = __dlm_lookup_lockres(dlm, name, namelen, hash); dlm 1438 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 1465 fs/ocfs2/dlm/dlmmaster.c if (res->owner == dlm->node_num) { dlm 1466 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_set_refmap_bit(dlm, res, request->node_idx); dlm 1499 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->master_lock); dlm 1500 fs/ocfs2/dlm/dlmmaster.c found = dlm_find_mle(dlm, &tmpmle, name, namelen); dlm 1514 fs/ocfs2/dlm/dlmmaster.c if (tmpmle->master == dlm->node_num) { dlm 1525 fs/ocfs2/dlm/dlmmaster.c if (tmpmle->master == dlm->node_num) { dlm 1531 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_set_refmap_bit(dlm, res, dlm 1544 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 1560 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->master_lock); dlm 1561 fs/ocfs2/dlm/dlmmaster.c found = dlm_find_mle(dlm, &tmpmle, name, namelen); dlm 1566 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 1567 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 1580 fs/ocfs2/dlm/dlmmaster.c dlm_init_mle(mle, DLM_MLE_BLOCK, dlm, NULL, name, namelen); dlm 1582 fs/ocfs2/dlm/dlmmaster.c __dlm_insert_mle(dlm, mle); dlm 1586 fs/ocfs2/dlm/dlmmaster.c if (tmpmle->master == dlm->node_num) { dlm 1602 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 1603 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 1618 fs/ocfs2/dlm/dlmmaster.c dlm->node_num, res->lockname.len, res->lockname.name); dlm 1620 fs/ocfs2/dlm/dlmmaster.c ret = dlm_dispatch_assert_master(dlm, res, 0, request->node_idx, dlm 1629 fs/ocfs2/dlm/dlmmaster.c __dlm_lockres_grab_inflight_worker(dlm, res); dlm 1638 fs/ocfs2/dlm/dlmmaster.c dlm_put(dlm); dlm 1652 fs/ocfs2/dlm/dlmmaster.c static int dlm_do_assert_master(struct dlm_ctxt *dlm, dlm 1682 fs/ocfs2/dlm/dlmmaster.c assert.node_idx = dlm->node_num; dlm 1687 fs/ocfs2/dlm/dlmmaster.c tmpret = o2net_send_message(DLM_ASSERT_MASTER_MSG, dlm->key, dlm 1692 fs/ocfs2/dlm/dlmmaster.c DLM_ASSERT_MASTER_MSG, dlm->key, to); dlm 1706 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 1707 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->master_lock); dlm 1708 fs/ocfs2/dlm/dlmmaster.c if (dlm_find_mle(dlm, &mle, (char *)lockname, dlm 1713 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 1714 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 1736 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_set_refmap_bit(dlm, res, to); dlm 1764 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm = data; dlm 1774 fs/ocfs2/dlm/dlmmaster.c if (!dlm_grab(dlm)) dlm 1787 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 1793 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->master_lock); dlm 1794 fs/ocfs2/dlm/dlmmaster.c if (!dlm_find_mle(dlm, &mle, name, namelen)) { dlm 1827 fs/ocfs2/dlm/dlmmaster.c dlm->name, namelen, name, dlm 1832 fs/ocfs2/dlm/dlmmaster.c dlm->name, namelen, name, dlm 1835 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 1836 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 1841 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 1845 fs/ocfs2/dlm/dlmmaster.c res = __dlm_lookup_lockres(dlm, name, namelen, hash); dlm 1918 fs/ocfs2/dlm/dlmmaster.c if (nn != dlm->node_num && nn != assert->node_idx) { dlm 1936 fs/ocfs2/dlm/dlmmaster.c dlm->node_num, mle->new_master); dlm 1939 fs/ocfs2/dlm/dlmmaster.c dlm_change_lockres_owner(dlm, res, mle->new_master); dlm 1942 fs/ocfs2/dlm/dlmmaster.c dlm_change_lockres_owner(dlm, res, mle->master); dlm 1953 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->master_lock); dlm 1970 fs/ocfs2/dlm/dlmmaster.c "inuse=%d\n", dlm->name, namelen, name, dlm 1974 fs/ocfs2/dlm/dlmmaster.c __dlm_unlink_mle(dlm, mle); dlm 1975 fs/ocfs2/dlm/dlmmaster.c __dlm_mle_detach_hb_events(dlm, mle); dlm 1984 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 1992 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 2002 fs/ocfs2/dlm/dlmmaster.c dlm_put(dlm); dlm 2010 fs/ocfs2/dlm/dlmmaster.c assert->node_idx, dlm->name, namelen, name); dlm 2017 fs/ocfs2/dlm/dlmmaster.c dlm->name, namelen, name, assert->node_idx); dlm 2027 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->master_lock); dlm 2030 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 2031 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 2033 fs/ocfs2/dlm/dlmmaster.c dlm_put(dlm); dlm 2051 fs/ocfs2/dlm/dlmmaster.c int dlm_dispatch_assert_master(struct dlm_ctxt *dlm, dlm 2062 fs/ocfs2/dlm/dlmmaster.c dlm_init_work_item(dlm, item, dlm_assert_master_worker, NULL); dlm 2073 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->work_lock); dlm 2074 fs/ocfs2/dlm/dlmmaster.c list_add_tail(&item->list, &dlm->work_list); dlm 2075 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->work_lock); dlm 2077 fs/ocfs2/dlm/dlmmaster.c queue_work(dlm->dlm_worker, &dlm->dispatched_work); dlm 2083 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm = data; dlm 2092 fs/ocfs2/dlm/dlmmaster.c dlm = item->dlm; dlm 2098 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 2099 fs/ocfs2/dlm/dlmmaster.c memcpy(nodemap, dlm->domain_map, sizeof(nodemap)); dlm 2100 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 2102 fs/ocfs2/dlm/dlmmaster.c clear_bit(dlm->node_num, nodemap); dlm 2108 fs/ocfs2/dlm/dlmmaster.c bit = dlm->node_num; dlm 2138 fs/ocfs2/dlm/dlmmaster.c res->lockname.len, res->lockname.name, dlm->node_num); dlm 2139 fs/ocfs2/dlm/dlmmaster.c ret = dlm_do_assert_master(dlm, res, nodemap, flags); dlm 2147 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_release_ast(dlm, res); dlm 2150 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_drop_inflight_worker(dlm, res); dlm 2167 fs/ocfs2/dlm/dlmmaster.c static int dlm_pre_master_reco_lockres(struct dlm_ctxt *dlm, dlm 2175 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 2176 fs/ocfs2/dlm/dlmmaster.c dlm_node_iter_init(dlm->domain_map, &iter); dlm 2177 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 2181 fs/ocfs2/dlm/dlmmaster.c if (nodenum == dlm->node_num) dlm 2183 fs/ocfs2/dlm/dlmmaster.c ret = dlm_do_master_requery(dlm, res, nodenum, &master); dlm 2195 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 2196 fs/ocfs2/dlm/dlmmaster.c if (test_bit(master, dlm->recovery_map)) { dlm 2200 fs/ocfs2/dlm/dlmmaster.c "lock. must wait.\n", dlm->name, dlm 2204 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 2205 fs/ocfs2/dlm/dlmmaster.c mlog(0, "%s: reco lock master is %u\n", dlm->name, dlm 2217 fs/ocfs2/dlm/dlmmaster.c int dlm_drop_lockres_ref(struct dlm_ctxt *dlm, struct dlm_lock_resource *res) dlm 2229 fs/ocfs2/dlm/dlmmaster.c deref.node_idx = dlm->node_num; dlm 2233 fs/ocfs2/dlm/dlmmaster.c ret = o2net_send_message(DLM_DEREF_LOCKRES_MSG, dlm->key, dlm 2237 fs/ocfs2/dlm/dlmmaster.c dlm->name, namelen, lockname, ret, res->owner); dlm 2241 fs/ocfs2/dlm/dlmmaster.c dlm->name, namelen, lockname, res->owner, r); dlm 2254 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm = data; dlm 2266 fs/ocfs2/dlm/dlmmaster.c if (!dlm_grab(dlm)) dlm 2284 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 2285 fs/ocfs2/dlm/dlmmaster.c res = __dlm_lookup_lockres_full(dlm, name, namelen, hash); dlm 2287 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 2289 fs/ocfs2/dlm/dlmmaster.c dlm->name, namelen, name); dlm 2292 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 2300 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_clear_refmap_bit(dlm, res, node); dlm 2308 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_calc_usage(dlm, res); dlm 2311 fs/ocfs2/dlm/dlmmaster.c "but it is already dropped!\n", dlm->name, dlm 2326 fs/ocfs2/dlm/dlmmaster.c dlm_init_work_item(dlm, item, dlm_deref_lockres_worker, NULL); dlm 2330 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->work_lock); dlm 2331 fs/ocfs2/dlm/dlmmaster.c list_add_tail(&item->list, &dlm->work_list); dlm 2332 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->work_lock); dlm 2334 fs/ocfs2/dlm/dlmmaster.c queue_work(dlm->dlm_worker, &dlm->dispatched_work); dlm 2340 fs/ocfs2/dlm/dlmmaster.c dlm_put(dlm); dlm 2348 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm = data; dlm 2358 fs/ocfs2/dlm/dlmmaster.c if (!dlm_grab(dlm)) dlm 2376 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 2377 fs/ocfs2/dlm/dlmmaster.c res = __dlm_lookup_lockres_full(dlm, name, namelen, hash); dlm 2379 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 2381 fs/ocfs2/dlm/dlmmaster.c dlm->name, namelen, name); dlm 2388 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 2390 fs/ocfs2/dlm/dlmmaster.c "but it is already derefed!\n", dlm->name, dlm 2396 fs/ocfs2/dlm/dlmmaster.c __dlm_do_purge_lockres(dlm, res); dlm 2400 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 2406 fs/ocfs2/dlm/dlmmaster.c dlm_put(dlm); dlm 2410 fs/ocfs2/dlm/dlmmaster.c static void dlm_drop_lockres_ref_done(struct dlm_ctxt *dlm, dlm 2423 fs/ocfs2/dlm/dlmmaster.c deref.node_idx = dlm->node_num; dlm 2427 fs/ocfs2/dlm/dlmmaster.c ret = o2net_send_message(DLM_DEREF_LOCKRES_DONE, dlm->key, dlm 2431 fs/ocfs2/dlm/dlmmaster.c " to node %u\n", dlm->name, namelen, dlm 2436 fs/ocfs2/dlm/dlmmaster.c dlm->name, namelen, lockname, node, r); dlm 2443 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm; dlm 2448 fs/ocfs2/dlm/dlmmaster.c dlm = item->dlm; dlm 2456 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_clear_refmap_bit(dlm, res, node); dlm 2461 fs/ocfs2/dlm/dlmmaster.c dlm_drop_lockres_ref_done(dlm, res, node); dlm 2465 fs/ocfs2/dlm/dlmmaster.c dlm->name, res->lockname.len, res->lockname.name, node); dlm 2466 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_calc_usage(dlm, res); dlm 2469 fs/ocfs2/dlm/dlmmaster.c "but it is already dropped!\n", dlm->name, dlm 2484 fs/ocfs2/dlm/dlmmaster.c static int dlm_is_lockres_migratable(struct dlm_ctxt *dlm, dlm 2504 fs/ocfs2/dlm/dlmmaster.c if (res->owner != dlm->node_num) dlm 2510 fs/ocfs2/dlm/dlmmaster.c if (lock->ml.node != dlm->node_num) { dlm 2516 fs/ocfs2/dlm/dlmmaster.c "%s list\n", dlm->name, res->lockname.len, dlm 2531 fs/ocfs2/dlm/dlmmaster.c mlog(0, "%s: res %.*s, Migratable\n", dlm->name, res->lockname.len, dlm 2542 fs/ocfs2/dlm/dlmmaster.c static int dlm_migrate_lockres(struct dlm_ctxt *dlm, dlm 2554 fs/ocfs2/dlm/dlmmaster.c if (!dlm_grab(dlm)) dlm 2562 fs/ocfs2/dlm/dlmmaster.c mlog(0, "%s: Migrating %.*s to node %u\n", dlm->name, namelen, name, dlm 2584 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 2585 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->master_lock); dlm 2586 fs/ocfs2/dlm/dlmmaster.c ret = dlm_add_migration_mle(dlm, res, mle, &oldmle, name, dlm 2587 fs/ocfs2/dlm/dlmmaster.c namelen, target, dlm->node_num); dlm 2595 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 2596 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 2608 fs/ocfs2/dlm/dlmmaster.c if (dlm_mark_lockres_migrating(dlm, res, target) < 0) { dlm 2622 fs/ocfs2/dlm/dlmmaster.c dlm_mle_detach_hb_events(dlm, oldmle); dlm 2628 fs/ocfs2/dlm/dlmmaster.c dlm_mle_detach_hb_events(dlm, mle); dlm 2646 fs/ocfs2/dlm/dlmmaster.c flush_workqueue(dlm->dlm_worker); dlm 2652 fs/ocfs2/dlm/dlmmaster.c ret = dlm_send_one_lockres(dlm, res, mres, target, dlm 2659 fs/ocfs2/dlm/dlmmaster.c dlm_mle_detach_hb_events(dlm, mle); dlm 2667 fs/ocfs2/dlm/dlmmaster.c dlm_wait_for_node_death(dlm, target, dlm 2695 fs/ocfs2/dlm/dlmmaster.c dlm->name, res->lockname.len, res->lockname.name); dlm 2698 fs/ocfs2/dlm/dlmmaster.c if (dlm_is_node_dead(dlm, target)) { dlm 2701 fs/ocfs2/dlm/dlmmaster.c dlm->name, res->lockname.len, dlm 2705 fs/ocfs2/dlm/dlmmaster.c dlm_mle_detach_hb_events(dlm, mle); dlm 2716 fs/ocfs2/dlm/dlmmaster.c dlm->name, res->lockname.len, res->lockname.name); dlm 2721 fs/ocfs2/dlm/dlmmaster.c dlm_set_lockres_owner(dlm, res, target); dlm 2723 fs/ocfs2/dlm/dlmmaster.c dlm_remove_nonlocal_locks(dlm, res); dlm 2728 fs/ocfs2/dlm/dlmmaster.c dlm_mle_detach_hb_events(dlm, mle); dlm 2732 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_calc_usage(dlm, res); dlm 2737 fs/ocfs2/dlm/dlmmaster.c dlm_kick_thread(dlm, res); dlm 2747 fs/ocfs2/dlm/dlmmaster.c dlm_put(dlm); dlm 2749 fs/ocfs2/dlm/dlmmaster.c mlog(0, "%s: Migrating %.*s to %u, returns %d\n", dlm->name, namelen, dlm 2766 fs/ocfs2/dlm/dlmmaster.c int dlm_empty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res) dlm 2772 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->spinlock); dlm 2775 fs/ocfs2/dlm/dlmmaster.c if (dlm_is_lockres_migratable(dlm, res)) dlm 2776 fs/ocfs2/dlm/dlmmaster.c target = dlm_pick_migration_target(dlm, res); dlm 2783 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 2785 fs/ocfs2/dlm/dlmmaster.c ret = dlm_migrate_lockres(dlm, res, target); dlm 2788 fs/ocfs2/dlm/dlmmaster.c dlm->name, res->lockname.len, res->lockname.name, dlm 2790 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 2795 fs/ocfs2/dlm/dlmmaster.c int dlm_lock_basts_flushed(struct dlm_ctxt *dlm, struct dlm_lock *lock) dlm 2798 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->ast_lock); dlm 2802 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->ast_lock); dlm 2806 fs/ocfs2/dlm/dlmmaster.c static int dlm_migration_can_proceed(struct dlm_ctxt *dlm, dlm 2817 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 2818 fs/ocfs2/dlm/dlmmaster.c if (!test_bit(mig_target, dlm->domain_map)) dlm 2820 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 2824 fs/ocfs2/dlm/dlmmaster.c static int dlm_lockres_is_dirty(struct dlm_ctxt *dlm, dlm 2835 fs/ocfs2/dlm/dlmmaster.c static int dlm_mark_lockres_migrating(struct dlm_ctxt *dlm, dlm 2842 fs/ocfs2/dlm/dlmmaster.c res->lockname.len, res->lockname.name, dlm->node_num, dlm 2855 fs/ocfs2/dlm/dlmmaster.c dlm_kick_thread(dlm, res); dlm 2863 fs/ocfs2/dlm/dlmmaster.c wait_event(dlm->ast_wq, !dlm_lockres_is_dirty(dlm, res)); dlm 2864 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_release_ast(dlm, res); dlm 2872 fs/ocfs2/dlm/dlmmaster.c ret = wait_event_interruptible_timeout(dlm->migration_wq, dlm 2873 fs/ocfs2/dlm/dlmmaster.c dlm_migration_can_proceed(dlm, res, target), dlm 2878 fs/ocfs2/dlm/dlmmaster.c test_bit(target, dlm->domain_map) ? "no":"yes"); dlm 2882 fs/ocfs2/dlm/dlmmaster.c test_bit(target, dlm->domain_map) ? "no":"yes"); dlm 2884 fs/ocfs2/dlm/dlmmaster.c if (!dlm_migration_can_proceed(dlm, res, target)) { dlm 2891 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 2892 fs/ocfs2/dlm/dlmmaster.c if (!test_bit(target, dlm->domain_map)) { dlm 2897 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 2927 fs/ocfs2/dlm/dlmmaster.c static void dlm_remove_nonlocal_locks(struct dlm_ctxt *dlm, dlm 2936 fs/ocfs2/dlm/dlmmaster.c BUG_ON(res->owner == dlm->node_num); dlm 2940 fs/ocfs2/dlm/dlmmaster.c if (lock->ml.node != dlm->node_num) { dlm 2948 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_clear_refmap_bit(dlm, res, dlm 2966 fs/ocfs2/dlm/dlmmaster.c if (bit != dlm->node_num) { dlm 2968 fs/ocfs2/dlm/dlmmaster.c "migrating lockres, clearing\n", dlm->name, dlm 2970 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_clear_refmap_bit(dlm, res, bit); dlm 2981 fs/ocfs2/dlm/dlmmaster.c static u8 dlm_pick_migration_target(struct dlm_ctxt *dlm, dlm 2990 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->spinlock); dlm 2997 fs/ocfs2/dlm/dlmmaster.c if (lock->ml.node == dlm->node_num) dlm 2999 fs/ocfs2/dlm/dlmmaster.c if (test_bit(lock->ml.node, dlm->exit_domain_map)) dlm 3013 fs/ocfs2/dlm/dlmmaster.c if (noderef == dlm->node_num) dlm 3015 fs/ocfs2/dlm/dlmmaster.c if (test_bit(noderef, dlm->exit_domain_map)) dlm 3027 fs/ocfs2/dlm/dlmmaster.c static int dlm_do_migrate_request(struct dlm_ctxt *dlm, dlm 3051 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 3052 fs/ocfs2/dlm/dlmmaster.c skip = (!test_bit(nodenum, dlm->domain_map)); dlm 3053 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 3059 fs/ocfs2/dlm/dlmmaster.c ret = o2net_send_message(DLM_MIGRATE_REQUEST_MSG, dlm->key, dlm 3064 fs/ocfs2/dlm/dlmmaster.c "MIGRATE_REQUEST to node %u\n", dlm->name, dlm 3081 fs/ocfs2/dlm/dlmmaster.c dlm->name, res->lockname.len, res->lockname.name, dlm 3084 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_set_refmap_bit(dlm, res, nodenum); dlm 3107 fs/ocfs2/dlm/dlmmaster.c struct dlm_ctxt *dlm = data; dlm 3115 fs/ocfs2/dlm/dlmmaster.c if (!dlm_grab(dlm)) dlm 3131 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 3132 fs/ocfs2/dlm/dlmmaster.c res = __dlm_lookup_lockres(dlm, name, namelen, hash); dlm 3150 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->master_lock); dlm 3152 fs/ocfs2/dlm/dlmmaster.c ret = dlm_add_migration_mle(dlm, res, mle, &oldmle, dlm 3160 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 3162 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 3166 fs/ocfs2/dlm/dlmmaster.c dlm_mle_detach_hb_events(dlm, oldmle); dlm 3173 fs/ocfs2/dlm/dlmmaster.c dlm_put(dlm); dlm 3184 fs/ocfs2/dlm/dlmmaster.c static int dlm_add_migration_mle(struct dlm_ctxt *dlm, dlm 3196 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->spinlock); dlm 3197 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->master_lock); dlm 3200 fs/ocfs2/dlm/dlmmaster.c found = dlm_find_mle(dlm, oldmle, (char *)name, namelen); dlm 3205 fs/ocfs2/dlm/dlmmaster.c if (master == dlm->node_num) { dlm 3229 fs/ocfs2/dlm/dlmmaster.c __dlm_unlink_mle(dlm, tmp); dlm 3230 fs/ocfs2/dlm/dlmmaster.c __dlm_mle_detach_hb_events(dlm, tmp); dlm 3236 fs/ocfs2/dlm/dlmmaster.c "migration\n", dlm->name, dlm 3245 fs/ocfs2/dlm/dlmmaster.c dlm_init_mle(mle, DLM_MLE_MIGRATION, dlm, res, name, namelen); dlm 3252 fs/ocfs2/dlm/dlmmaster.c __dlm_insert_mle(dlm, mle); dlm 3260 fs/ocfs2/dlm/dlmmaster.c static struct dlm_lock_resource *dlm_reset_mleres_owner(struct dlm_ctxt *dlm, dlm 3266 fs/ocfs2/dlm/dlmmaster.c res = __dlm_lookup_lockres(dlm, mle->mname, mle->mnamelen, dlm 3269 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 3273 fs/ocfs2/dlm/dlmmaster.c dlm_set_lockres_owner(dlm, res, DLM_LOCK_RES_OWNER_UNKNOWN); dlm 3274 fs/ocfs2/dlm/dlmmaster.c dlm_move_lockres_to_recovery_list(dlm, res); dlm 3279 fs/ocfs2/dlm/dlmmaster.c __dlm_mle_detach_hb_events(dlm, mle); dlm 3282 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->master_lock); dlm 3284 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 3290 fs/ocfs2/dlm/dlmmaster.c static void dlm_clean_migration_mle(struct dlm_ctxt *dlm, dlm 3293 fs/ocfs2/dlm/dlmmaster.c __dlm_mle_detach_hb_events(dlm, mle); dlm 3296 fs/ocfs2/dlm/dlmmaster.c __dlm_unlink_mle(dlm, mle); dlm 3303 fs/ocfs2/dlm/dlmmaster.c static void dlm_clean_block_mle(struct dlm_ctxt *dlm, dlm 3327 fs/ocfs2/dlm/dlmmaster.c __dlm_mle_detach_hb_events(dlm, mle); dlm 3332 fs/ocfs2/dlm/dlmmaster.c void dlm_clean_master_list(struct dlm_ctxt *dlm, u8 dead_node) dlm 3340 fs/ocfs2/dlm/dlmmaster.c mlog(0, "dlm=%s, dead node=%u\n", dlm->name, dead_node); dlm 3342 fs/ocfs2/dlm/dlmmaster.c assert_spin_locked(&dlm->spinlock); dlm 3345 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->master_lock); dlm 3347 fs/ocfs2/dlm/dlmmaster.c bucket = dlm_master_hash(dlm, i); dlm 3363 fs/ocfs2/dlm/dlmmaster.c dlm_clean_block_mle(dlm, mle, dead_node); dlm 3386 fs/ocfs2/dlm/dlmmaster.c dlm->name, dead_node, dlm 3393 fs/ocfs2/dlm/dlmmaster.c dlm_clean_migration_mle(dlm, mle); dlm 3396 fs/ocfs2/dlm/dlmmaster.c "%u to %u!\n", dlm->name, dead_node, mle->master, dlm 3404 fs/ocfs2/dlm/dlmmaster.c res = dlm_reset_mleres_owner(dlm, mle); dlm 3413 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 3416 fs/ocfs2/dlm/dlmmaster.c int dlm_finish_migration(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, dlm 3422 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 3423 fs/ocfs2/dlm/dlmmaster.c dlm_node_iter_init(dlm->domain_map, &iter); dlm 3425 fs/ocfs2/dlm/dlmmaster.c clear_bit(dlm->node_num, iter.node_map); dlm 3426 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 3432 fs/ocfs2/dlm/dlmmaster.c dlm_lockres_set_refmap_bit(dlm, res, old_master); dlm 3436 fs/ocfs2/dlm/dlmmaster.c ret = dlm_do_migrate_request(dlm, res, old_master, dlm 3437 fs/ocfs2/dlm/dlmmaster.c dlm->node_num, &iter); dlm 3447 fs/ocfs2/dlm/dlmmaster.c ret = dlm_do_assert_master(dlm, res, iter.node_map, dlm 3459 fs/ocfs2/dlm/dlmmaster.c ret = dlm_do_assert_master(dlm, res, iter.node_map, dlm 3471 fs/ocfs2/dlm/dlmmaster.c dlm_set_lockres_owner(dlm, res, dlm->node_num); dlm 3475 fs/ocfs2/dlm/dlmmaster.c dlm_kick_thread(dlm, res); dlm 3514 fs/ocfs2/dlm/dlmmaster.c void dlm_lockres_release_ast(struct dlm_ctxt *dlm, dlm 3530 fs/ocfs2/dlm/dlmmaster.c wake_up(&dlm->migration_wq); dlm 3533 fs/ocfs2/dlm/dlmmaster.c void dlm_force_free_mles(struct dlm_ctxt *dlm) dlm 3546 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->spinlock); dlm 3547 fs/ocfs2/dlm/dlmmaster.c spin_lock(&dlm->master_lock); dlm 3549 fs/ocfs2/dlm/dlmmaster.c BUG_ON(dlm->dlm_state != DLM_CTXT_LEAVING); dlm 3550 fs/ocfs2/dlm/dlmmaster.c BUG_ON((find_next_bit(dlm->domain_map, O2NM_MAX_NODES, 0) < O2NM_MAX_NODES)); dlm 3553 fs/ocfs2/dlm/dlmmaster.c bucket = dlm_master_hash(dlm, i); dlm 3562 fs/ocfs2/dlm/dlmmaster.c __dlm_unlink_mle(dlm, mle); dlm 3563 fs/ocfs2/dlm/dlmmaster.c __dlm_mle_detach_hb_events(dlm, mle); dlm 3567 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->master_lock); dlm 3568 fs/ocfs2/dlm/dlmmaster.c spin_unlock(&dlm->spinlock); dlm 40 fs/ocfs2/dlm/dlmrecovery.c static void dlm_do_local_recovery_cleanup(struct dlm_ctxt *dlm, u8 dead_node); dlm 43 fs/ocfs2/dlm/dlmrecovery.c static int dlm_do_recovery(struct dlm_ctxt *dlm); dlm 45 fs/ocfs2/dlm/dlmrecovery.c static int dlm_pick_recovery_master(struct dlm_ctxt *dlm); dlm 46 fs/ocfs2/dlm/dlmrecovery.c static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node); dlm 47 fs/ocfs2/dlm/dlmrecovery.c static int dlm_init_recovery_area(struct dlm_ctxt *dlm, u8 dead_node); dlm 48 fs/ocfs2/dlm/dlmrecovery.c static int dlm_request_all_locks(struct dlm_ctxt *dlm, dlm 50 fs/ocfs2/dlm/dlmrecovery.c static void dlm_destroy_recovery_area(struct dlm_ctxt *dlm); dlm 57 fs/ocfs2/dlm/dlmrecovery.c static int dlm_send_mig_lockres_msg(struct dlm_ctxt *dlm, dlm 62 fs/ocfs2/dlm/dlmrecovery.c static int dlm_process_recovery_data(struct dlm_ctxt *dlm, dlm 65 fs/ocfs2/dlm/dlmrecovery.c static int dlm_send_finalize_reco_message(struct dlm_ctxt *dlm); dlm 66 fs/ocfs2/dlm/dlmrecovery.c static int dlm_send_all_done_msg(struct dlm_ctxt *dlm, dlm 68 fs/ocfs2/dlm/dlmrecovery.c static int dlm_send_begin_reco_message(struct dlm_ctxt *dlm, u8 dead_node); dlm 69 fs/ocfs2/dlm/dlmrecovery.c static void dlm_move_reco_locks_to_list(struct dlm_ctxt *dlm, dlm 71 fs/ocfs2/dlm/dlmrecovery.c static void dlm_finish_local_lockres_recovery(struct dlm_ctxt *dlm, dlm 79 fs/ocfs2/dlm/dlmrecovery.c static int dlm_lockres_master_requery(struct dlm_ctxt *dlm, dlm 102 fs/ocfs2/dlm/dlmrecovery.c static inline void dlm_set_reco_dead_node(struct dlm_ctxt *dlm, dlm 105 fs/ocfs2/dlm/dlmrecovery.c assert_spin_locked(&dlm->spinlock); dlm 106 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.dead_node != dead_node) dlm 108 fs/ocfs2/dlm/dlmrecovery.c dlm->name, dlm->reco.dead_node, dead_node); dlm 109 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node = dead_node; dlm 112 fs/ocfs2/dlm/dlmrecovery.c static inline void dlm_set_reco_master(struct dlm_ctxt *dlm, dlm 115 fs/ocfs2/dlm/dlmrecovery.c assert_spin_locked(&dlm->spinlock); dlm 117 fs/ocfs2/dlm/dlmrecovery.c dlm->name, dlm->reco.new_master, master); dlm 118 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.new_master = master; dlm 121 fs/ocfs2/dlm/dlmrecovery.c static inline void __dlm_reset_recovery(struct dlm_ctxt *dlm) dlm 123 fs/ocfs2/dlm/dlmrecovery.c assert_spin_locked(&dlm->spinlock); dlm 124 fs/ocfs2/dlm/dlmrecovery.c clear_bit(dlm->reco.dead_node, dlm->recovery_map); dlm 125 fs/ocfs2/dlm/dlmrecovery.c dlm_set_reco_dead_node(dlm, O2NM_INVALID_NODE_NUM); dlm 126 fs/ocfs2/dlm/dlmrecovery.c dlm_set_reco_master(dlm, O2NM_INVALID_NODE_NUM); dlm 129 fs/ocfs2/dlm/dlmrecovery.c static inline void dlm_reset_recovery(struct dlm_ctxt *dlm) dlm 131 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 132 fs/ocfs2/dlm/dlmrecovery.c __dlm_reset_recovery(dlm); dlm 133 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 139 fs/ocfs2/dlm/dlmrecovery.c struct dlm_ctxt *dlm = dlm 146 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->work_lock); dlm 147 fs/ocfs2/dlm/dlmrecovery.c list_splice_init(&dlm->work_list, &tmp_list); dlm 148 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->work_lock); dlm 153 fs/ocfs2/dlm/dlmrecovery.c mlog(0, "%s: work thread has %d work items\n", dlm->name, tot); dlm 161 fs/ocfs2/dlm/dlmrecovery.c BUG_ON(item->dlm != dlm); dlm 167 fs/ocfs2/dlm/dlmrecovery.c dlm_put(dlm); dlm 176 fs/ocfs2/dlm/dlmrecovery.c void dlm_kick_recovery_thread(struct dlm_ctxt *dlm) dlm 184 fs/ocfs2/dlm/dlmrecovery.c wake_up(&dlm->dlm_reco_thread_wq); dlm 188 fs/ocfs2/dlm/dlmrecovery.c int dlm_launch_recovery_thread(struct dlm_ctxt *dlm) dlm 192 fs/ocfs2/dlm/dlmrecovery.c dlm->dlm_reco_thread_task = kthread_run(dlm_recovery_thread, dlm, dlm 193 fs/ocfs2/dlm/dlmrecovery.c "dlm_reco-%s", dlm->name); dlm 194 fs/ocfs2/dlm/dlmrecovery.c if (IS_ERR(dlm->dlm_reco_thread_task)) { dlm 195 fs/ocfs2/dlm/dlmrecovery.c mlog_errno(PTR_ERR(dlm->dlm_reco_thread_task)); dlm 196 fs/ocfs2/dlm/dlmrecovery.c dlm->dlm_reco_thread_task = NULL; dlm 203 fs/ocfs2/dlm/dlmrecovery.c void dlm_complete_recovery_thread(struct dlm_ctxt *dlm) dlm 205 fs/ocfs2/dlm/dlmrecovery.c if (dlm->dlm_reco_thread_task) { dlm 207 fs/ocfs2/dlm/dlmrecovery.c kthread_stop(dlm->dlm_reco_thread_task); dlm 208 fs/ocfs2/dlm/dlmrecovery.c dlm->dlm_reco_thread_task = NULL; dlm 237 fs/ocfs2/dlm/dlmrecovery.c static void dlm_print_reco_node_status(struct dlm_ctxt *dlm) dlm 243 fs/ocfs2/dlm/dlmrecovery.c dlm->name, task_pid_nr(dlm->dlm_reco_thread_task), dlm 244 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.state & DLM_RECO_STATE_ACTIVE ? "ACTIVE" : "inactive", dlm 245 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node, dlm->reco.new_master); dlm 247 fs/ocfs2/dlm/dlmrecovery.c list_for_each_entry(ndata, &dlm->reco.node_data, list) { dlm 276 fs/ocfs2/dlm/dlmrecovery.c dlm->name, ndata->node_num, st); dlm 278 fs/ocfs2/dlm/dlmrecovery.c list_for_each_entry(res, &dlm->reco.resources, recovering) { dlm 280 fs/ocfs2/dlm/dlmrecovery.c dlm->name, res->lockname.len, res->lockname.name); dlm 289 fs/ocfs2/dlm/dlmrecovery.c struct dlm_ctxt *dlm = data; dlm 292 fs/ocfs2/dlm/dlmrecovery.c mlog(0, "dlm thread running for %s...\n", dlm->name); dlm 295 fs/ocfs2/dlm/dlmrecovery.c if (dlm_domain_fully_joined(dlm)) { dlm 296 fs/ocfs2/dlm/dlmrecovery.c status = dlm_do_recovery(dlm); dlm 305 fs/ocfs2/dlm/dlmrecovery.c wait_event_interruptible_timeout(dlm->dlm_reco_thread_wq, dlm 315 fs/ocfs2/dlm/dlmrecovery.c static int dlm_reco_master_ready(struct dlm_ctxt *dlm) dlm 318 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 319 fs/ocfs2/dlm/dlmrecovery.c ready = (dlm->reco.new_master != O2NM_INVALID_NODE_NUM); dlm 320 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 326 fs/ocfs2/dlm/dlmrecovery.c int dlm_is_node_dead(struct dlm_ctxt *dlm, u8 node) dlm 329 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 330 fs/ocfs2/dlm/dlmrecovery.c dead = !test_bit(node, dlm->domain_map); dlm 331 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 337 fs/ocfs2/dlm/dlmrecovery.c static int dlm_is_node_recovered(struct dlm_ctxt *dlm, u8 node) dlm 340 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 341 fs/ocfs2/dlm/dlmrecovery.c recovered = !test_bit(node, dlm->recovery_map); dlm 342 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 347 fs/ocfs2/dlm/dlmrecovery.c void dlm_wait_for_node_death(struct dlm_ctxt *dlm, u8 node, int timeout) dlm 349 fs/ocfs2/dlm/dlmrecovery.c if (dlm_is_node_dead(dlm, node)) dlm 353 fs/ocfs2/dlm/dlmrecovery.c "domain %s\n", node, dlm->name); dlm 356 fs/ocfs2/dlm/dlmrecovery.c wait_event_timeout(dlm->dlm_reco_thread_wq, dlm 357 fs/ocfs2/dlm/dlmrecovery.c dlm_is_node_dead(dlm, node), dlm 360 fs/ocfs2/dlm/dlmrecovery.c wait_event(dlm->dlm_reco_thread_wq, dlm 361 fs/ocfs2/dlm/dlmrecovery.c dlm_is_node_dead(dlm, node)); dlm 364 fs/ocfs2/dlm/dlmrecovery.c void dlm_wait_for_node_recovery(struct dlm_ctxt *dlm, u8 node, int timeout) dlm 366 fs/ocfs2/dlm/dlmrecovery.c if (dlm_is_node_recovered(dlm, node)) dlm 370 fs/ocfs2/dlm/dlmrecovery.c "domain %s\n", node, dlm->name); dlm 373 fs/ocfs2/dlm/dlmrecovery.c wait_event_timeout(dlm->dlm_reco_thread_wq, dlm 374 fs/ocfs2/dlm/dlmrecovery.c dlm_is_node_recovered(dlm, node), dlm 377 fs/ocfs2/dlm/dlmrecovery.c wait_event(dlm->dlm_reco_thread_wq, dlm 378 fs/ocfs2/dlm/dlmrecovery.c dlm_is_node_recovered(dlm, node)); dlm 387 fs/ocfs2/dlm/dlmrecovery.c static int dlm_in_recovery(struct dlm_ctxt *dlm) dlm 390 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 391 fs/ocfs2/dlm/dlmrecovery.c in_recovery = !!(dlm->reco.state & DLM_RECO_STATE_ACTIVE); dlm 392 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 397 fs/ocfs2/dlm/dlmrecovery.c void dlm_wait_for_recovery(struct dlm_ctxt *dlm) dlm 399 fs/ocfs2/dlm/dlmrecovery.c if (dlm_in_recovery(dlm)) { dlm 402 fs/ocfs2/dlm/dlmrecovery.c dlm->name, task_pid_nr(dlm->dlm_reco_thread_task), dlm 403 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.state, dlm->reco.new_master, dlm 404 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node); dlm 406 fs/ocfs2/dlm/dlmrecovery.c wait_event(dlm->reco.event, !dlm_in_recovery(dlm)); dlm 409 fs/ocfs2/dlm/dlmrecovery.c static void dlm_begin_recovery(struct dlm_ctxt *dlm) dlm 411 fs/ocfs2/dlm/dlmrecovery.c assert_spin_locked(&dlm->spinlock); dlm 412 fs/ocfs2/dlm/dlmrecovery.c BUG_ON(dlm->reco.state & DLM_RECO_STATE_ACTIVE); dlm 414 fs/ocfs2/dlm/dlmrecovery.c dlm->name, dlm->reco.dead_node); dlm 415 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.state |= DLM_RECO_STATE_ACTIVE; dlm 418 fs/ocfs2/dlm/dlmrecovery.c static void dlm_end_recovery(struct dlm_ctxt *dlm) dlm 420 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 421 fs/ocfs2/dlm/dlmrecovery.c BUG_ON(!(dlm->reco.state & DLM_RECO_STATE_ACTIVE)); dlm 422 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.state &= ~DLM_RECO_STATE_ACTIVE; dlm 423 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 424 fs/ocfs2/dlm/dlmrecovery.c printk(KERN_NOTICE "o2dlm: End recovery on domain %s\n", dlm->name); dlm 425 fs/ocfs2/dlm/dlmrecovery.c wake_up(&dlm->reco.event); dlm 428 fs/ocfs2/dlm/dlmrecovery.c static void dlm_print_recovery_master(struct dlm_ctxt *dlm) dlm 431 fs/ocfs2/dlm/dlmrecovery.c "dead node %u in domain %s\n", dlm->reco.new_master, dlm 432 fs/ocfs2/dlm/dlmrecovery.c (dlm->node_num == dlm->reco.new_master ? "me" : "he"), dlm 433 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node, dlm->name); dlm 436 fs/ocfs2/dlm/dlmrecovery.c static int dlm_do_recovery(struct dlm_ctxt *dlm) dlm 441 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 443 fs/ocfs2/dlm/dlmrecovery.c if (dlm->migrate_done) { dlm 445 fs/ocfs2/dlm/dlmrecovery.c "lock resources\n", dlm->name); dlm 446 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 451 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM && dlm 452 fs/ocfs2/dlm/dlmrecovery.c test_bit(dlm->reco.new_master, dlm->recovery_map)) { dlm 454 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.new_master, dlm->reco.dead_node); dlm 456 fs/ocfs2/dlm/dlmrecovery.c dlm_set_reco_master(dlm, O2NM_INVALID_NODE_NUM); dlm 460 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) { dlm 463 fs/ocfs2/dlm/dlmrecovery.c bit = find_next_bit (dlm->recovery_map, O2NM_MAX_NODES, 0); dlm 465 fs/ocfs2/dlm/dlmrecovery.c dlm_set_reco_dead_node(dlm, O2NM_INVALID_NODE_NUM); dlm 467 fs/ocfs2/dlm/dlmrecovery.c dlm_set_reco_dead_node(dlm, bit); dlm 468 fs/ocfs2/dlm/dlmrecovery.c } else if (!test_bit(dlm->reco.dead_node, dlm->recovery_map)) { dlm 471 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node); dlm 472 fs/ocfs2/dlm/dlmrecovery.c dlm_set_reco_dead_node(dlm, O2NM_INVALID_NODE_NUM); dlm 475 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) { dlm 477 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 482 fs/ocfs2/dlm/dlmrecovery.c dlm->name, task_pid_nr(dlm->dlm_reco_thread_task), dlm 483 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node); dlm 487 fs/ocfs2/dlm/dlmrecovery.c dlm_begin_recovery(dlm); dlm 489 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 491 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.new_master == dlm->node_num) dlm 494 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.new_master == O2NM_INVALID_NODE_NUM) { dlm 499 fs/ocfs2/dlm/dlmrecovery.c ret = dlm_pick_recovery_master(dlm); dlm 507 fs/ocfs2/dlm/dlmrecovery.c dlm_print_recovery_master(dlm); dlm 512 fs/ocfs2/dlm/dlmrecovery.c dlm_end_recovery(dlm); dlm 518 fs/ocfs2/dlm/dlmrecovery.c dlm_print_recovery_master(dlm); dlm 520 fs/ocfs2/dlm/dlmrecovery.c status = dlm_remaster_locks(dlm, dlm->reco.dead_node); dlm 524 fs/ocfs2/dlm/dlmrecovery.c "retrying.\n", dlm->name, status, dlm->reco.dead_node); dlm 531 fs/ocfs2/dlm/dlmrecovery.c dlm->name, dlm->reco.dead_node, dlm->node_num); dlm 532 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 533 fs/ocfs2/dlm/dlmrecovery.c __dlm_reset_recovery(dlm); dlm 534 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE; dlm 535 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 537 fs/ocfs2/dlm/dlmrecovery.c dlm_end_recovery(dlm); dlm 543 fs/ocfs2/dlm/dlmrecovery.c static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node) dlm 554 fs/ocfs2/dlm/dlmrecovery.c status = dlm_init_recovery_area(dlm, dead_node); dlm 557 fs/ocfs2/dlm/dlmrecovery.c "retrying\n", dlm->name); dlm 564 fs/ocfs2/dlm/dlmrecovery.c list_for_each_entry(ndata, &dlm->reco.node_data, list) { dlm 568 fs/ocfs2/dlm/dlmrecovery.c mlog(0, "%s: Requesting lock info from node %u\n", dlm->name, dlm 571 fs/ocfs2/dlm/dlmrecovery.c if (ndata->node_num == dlm->node_num) { dlm 577 fs/ocfs2/dlm/dlmrecovery.c status = dlm_request_all_locks(dlm, ndata->node_num, dlm 587 fs/ocfs2/dlm/dlmrecovery.c wait_event_timeout(dlm->dlm_reco_thread_wq, dlm 588 fs/ocfs2/dlm/dlmrecovery.c dlm_is_node_dead(dlm, dlm 593 fs/ocfs2/dlm/dlmrecovery.c dlm_is_node_dead(dlm, ndata->node_num) ? dlm 600 fs/ocfs2/dlm/dlmrecovery.c dlm->name, ndata->node_num, dlm 641 fs/ocfs2/dlm/dlmrecovery.c mlog(0, "%s: Done requesting all lock info\n", dlm->name); dlm 651 fs/ocfs2/dlm/dlmrecovery.c list_for_each_entry(ndata, &dlm->reco.node_data, list) { dlm 671 fs/ocfs2/dlm/dlmrecovery.c dlm->name, ndata->node_num, dlm 678 fs/ocfs2/dlm/dlmrecovery.c dlm->name, ndata->node_num); dlm 682 fs/ocfs2/dlm/dlmrecovery.c dlm->name, ndata->node_num); dlm 697 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 698 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.state |= DLM_RECO_STATE_FINALIZE; dlm 699 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 705 fs/ocfs2/dlm/dlmrecovery.c ret = dlm_send_finalize_reco_message(dlm); dlm 709 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 710 fs/ocfs2/dlm/dlmrecovery.c dlm_finish_local_lockres_recovery(dlm, dead_node, dlm 711 fs/ocfs2/dlm/dlmrecovery.c dlm->node_num); dlm 712 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 716 fs/ocfs2/dlm/dlmrecovery.c "dead=%u, this=%u, new=%u\n", dlm->name, dlm 717 fs/ocfs2/dlm/dlmrecovery.c jiffies, dlm->reco.dead_node, dlm 718 fs/ocfs2/dlm/dlmrecovery.c dlm->node_num, dlm->reco.new_master); dlm 722 fs/ocfs2/dlm/dlmrecovery.c dlm_kick_thread(dlm, NULL); dlm 727 fs/ocfs2/dlm/dlmrecovery.c wait_event_interruptible_timeout(dlm->dlm_reco_thread_wq, dlm 734 fs/ocfs2/dlm/dlmrecovery.c dlm_destroy_recovery_area(dlm); dlm 739 fs/ocfs2/dlm/dlmrecovery.c static int dlm_init_recovery_area(struct dlm_ctxt *dlm, u8 dead_node) dlm 744 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 745 fs/ocfs2/dlm/dlmrecovery.c memcpy(dlm->reco.node_map, dlm->domain_map, sizeof(dlm->domain_map)); dlm 748 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 751 fs/ocfs2/dlm/dlmrecovery.c num = find_next_bit (dlm->reco.node_map, O2NM_MAX_NODES, num); dlm 759 fs/ocfs2/dlm/dlmrecovery.c dlm_destroy_recovery_area(dlm); dlm 765 fs/ocfs2/dlm/dlmrecovery.c list_add_tail(&ndata->list, &dlm->reco.node_data); dlm 773 fs/ocfs2/dlm/dlmrecovery.c static void dlm_destroy_recovery_area(struct dlm_ctxt *dlm) dlm 779 fs/ocfs2/dlm/dlmrecovery.c list_splice_init(&dlm->reco.node_data, &tmplist); dlm 788 fs/ocfs2/dlm/dlmrecovery.c static int dlm_request_all_locks(struct dlm_ctxt *dlm, u8 request_from, dlm 802 fs/ocfs2/dlm/dlmrecovery.c lr.node_idx = dlm->node_num; dlm 806 fs/ocfs2/dlm/dlmrecovery.c ret = o2net_send_message(DLM_LOCK_REQUEST_MSG, dlm->key, dlm 812 fs/ocfs2/dlm/dlmrecovery.c "to recover dead node %u\n", dlm->name, ret, dlm 825 fs/ocfs2/dlm/dlmrecovery.c struct dlm_ctxt *dlm = data; dlm 830 fs/ocfs2/dlm/dlmrecovery.c if (!dlm_grab(dlm)) dlm 833 fs/ocfs2/dlm/dlmrecovery.c if (lr->dead_node != dlm->reco.dead_node) { dlm 835 fs/ocfs2/dlm/dlmrecovery.c "dead_node is %u\n", dlm->name, lr->node_idx, dlm 836 fs/ocfs2/dlm/dlmrecovery.c lr->dead_node, dlm->reco.dead_node); dlm 837 fs/ocfs2/dlm/dlmrecovery.c dlm_print_reco_node_status(dlm); dlm 839 fs/ocfs2/dlm/dlmrecovery.c dlm_put(dlm); dlm 842 fs/ocfs2/dlm/dlmrecovery.c BUG_ON(lr->dead_node != dlm->reco.dead_node); dlm 846 fs/ocfs2/dlm/dlmrecovery.c dlm_put(dlm); dlm 854 fs/ocfs2/dlm/dlmrecovery.c dlm_put(dlm); dlm 859 fs/ocfs2/dlm/dlmrecovery.c dlm_grab(dlm); /* get an extra ref for the work item */ dlm 860 fs/ocfs2/dlm/dlmrecovery.c dlm_init_work_item(dlm, item, dlm_request_all_locks_worker, buf); dlm 863 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->work_lock); dlm 864 fs/ocfs2/dlm/dlmrecovery.c list_add_tail(&item->list, &dlm->work_list); dlm 865 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->work_lock); dlm 866 fs/ocfs2/dlm/dlmrecovery.c queue_work(dlm->dlm_worker, &dlm->dispatched_work); dlm 868 fs/ocfs2/dlm/dlmrecovery.c dlm_put(dlm); dlm 876 fs/ocfs2/dlm/dlmrecovery.c struct dlm_ctxt *dlm; dlm 882 fs/ocfs2/dlm/dlmrecovery.c dlm = item->dlm; dlm 888 fs/ocfs2/dlm/dlmrecovery.c dlm->name, dead_node, reco_master); dlm 890 fs/ocfs2/dlm/dlmrecovery.c if (dead_node != dlm->reco.dead_node || dlm 891 fs/ocfs2/dlm/dlmrecovery.c reco_master != dlm->reco.new_master) { dlm 894 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.new_master == O2NM_INVALID_NODE_NUM) { dlm 897 fs/ocfs2/dlm/dlmrecovery.c " current=(dead=%u,mas=%u)\n", dlm->name, dlm 899 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node, dlm->reco.new_master); dlm 903 fs/ocfs2/dlm/dlmrecovery.c dlm->name, dlm->reco.dead_node, dlm 904 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.new_master, dead_node, reco_master); dlm 915 fs/ocfs2/dlm/dlmrecovery.c dlm_move_reco_locks_to_list(dlm, &resources, dead_node); dlm 922 fs/ocfs2/dlm/dlmrecovery.c ret = dlm_send_one_lockres(dlm, res, mres, reco_master, dlm 926 fs/ocfs2/dlm/dlmrecovery.c "recovery state for dead node %u, ret=%d\n", dlm->name, dlm 934 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 935 fs/ocfs2/dlm/dlmrecovery.c list_splice_init(&resources, &dlm->reco.resources); dlm 936 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 939 fs/ocfs2/dlm/dlmrecovery.c ret = dlm_send_all_done_msg(dlm, dead_node, reco_master); dlm 943 fs/ocfs2/dlm/dlmrecovery.c dlm->name, reco_master, dead_node, ret); dlm 951 fs/ocfs2/dlm/dlmrecovery.c static int dlm_send_all_done_msg(struct dlm_ctxt *dlm, u8 dead_node, u8 send_to) dlm 957 fs/ocfs2/dlm/dlmrecovery.c done_msg.node_idx = dlm->node_num; dlm 963 fs/ocfs2/dlm/dlmrecovery.c ret = o2net_send_message(DLM_RECO_DATA_DONE_MSG, dlm->key, &done_msg, dlm 967 fs/ocfs2/dlm/dlmrecovery.c "to recover dead node %u\n", dlm->name, ret, send_to, dlm 981 fs/ocfs2/dlm/dlmrecovery.c struct dlm_ctxt *dlm = data; dlm 986 fs/ocfs2/dlm/dlmrecovery.c if (!dlm_grab(dlm)) dlm 991 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node, done->node_idx, dlm->node_num); dlm 993 fs/ocfs2/dlm/dlmrecovery.c mlog_bug_on_msg((done->dead_node != dlm->reco.dead_node), dlm 996 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node, done->node_idx, dlm->node_num); dlm 999 fs/ocfs2/dlm/dlmrecovery.c list_for_each_entry(ndata, &dlm->reco.node_data, list) { dlm 1032 fs/ocfs2/dlm/dlmrecovery.c dlm_kick_recovery_thread(dlm); dlm 1037 fs/ocfs2/dlm/dlmrecovery.c dlm_put(dlm); dlm 1043 fs/ocfs2/dlm/dlmrecovery.c static void dlm_move_reco_locks_to_list(struct dlm_ctxt *dlm, dlm 1050 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 1051 fs/ocfs2/dlm/dlmrecovery.c list_for_each_entry_safe(res, next, &dlm->reco.resources, recovering) { dlm 1062 fs/ocfs2/dlm/dlmrecovery.c dead_node, dlm->name); dlm 1086 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 1104 fs/ocfs2/dlm/dlmrecovery.c static int dlm_send_mig_lockres_msg(struct dlm_ctxt *dlm, dlm 1127 fs/ocfs2/dlm/dlmrecovery.c dlm->name, res->lockname.len, res->lockname.name, dlm 1132 fs/ocfs2/dlm/dlmrecovery.c ret = o2net_send_message(DLM_MIG_LOCKRES_MSG, dlm->key, mres, dlm 1139 fs/ocfs2/dlm/dlmrecovery.c "node %u (%s)\n", dlm->name, mres->lockname_len, dlm 1240 fs/ocfs2/dlm/dlmrecovery.c static void dlm_add_dummy_lock(struct dlm_ctxt *dlm, dlm 1250 fs/ocfs2/dlm/dlmrecovery.c dummy.ml.node = dlm->node_num; dlm 1254 fs/ocfs2/dlm/dlmrecovery.c static inline int dlm_is_dummy_lock(struct dlm_ctxt *dlm, dlm 1269 fs/ocfs2/dlm/dlmrecovery.c int dlm_send_one_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, dlm 1307 fs/ocfs2/dlm/dlmrecovery.c ret = dlm_send_mig_lockres_msg(dlm, mres, send_to, dlm 1316 fs/ocfs2/dlm/dlmrecovery.c dlm->name, res->lockname.len, res->lockname.name, dlm 1319 fs/ocfs2/dlm/dlmrecovery.c dlm_add_dummy_lock(dlm, mres); dlm 1322 fs/ocfs2/dlm/dlmrecovery.c ret = dlm_send_mig_lockres_msg(dlm, mres, send_to, res, total_locks); dlm 1329 fs/ocfs2/dlm/dlmrecovery.c dlm->name, ret); dlm 1333 fs/ocfs2/dlm/dlmrecovery.c "lockres %.*s\n", dlm->name, send_to, dlm 1357 fs/ocfs2/dlm/dlmrecovery.c struct dlm_ctxt *dlm = data; dlm 1368 fs/ocfs2/dlm/dlmrecovery.c if (!dlm_grab(dlm)) dlm 1371 fs/ocfs2/dlm/dlmrecovery.c if (!dlm_joined(dlm)) { dlm 1374 fs/ocfs2/dlm/dlmrecovery.c dlm->name, mres->lockname_len, dlm 1376 fs/ocfs2/dlm/dlmrecovery.c dlm_put(dlm); dlm 1404 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 1405 fs/ocfs2/dlm/dlmrecovery.c res = __dlm_lookup_lockres_full(dlm, mres->lockname, mres->lockname_len, dlm 1414 fs/ocfs2/dlm/dlmrecovery.c " ref!\n", dlm->name, dlm 1418 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 1439 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 1446 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 1448 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 1451 fs/ocfs2/dlm/dlmrecovery.c res = dlm_new_lockres(dlm, mres->lockname, mres->lockname_len); dlm 1465 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 1466 fs/ocfs2/dlm/dlmrecovery.c __dlm_insert_lockres(dlm, res); dlm 1467 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 1500 fs/ocfs2/dlm/dlmrecovery.c dlm_lockres_grab_inflight_ref(dlm, res); dlm 1510 fs/ocfs2/dlm/dlmrecovery.c dlm_change_lockres_owner(dlm, res, dlm->node_num); dlm 1515 fs/ocfs2/dlm/dlmrecovery.c dlm_grab(dlm); /* get an extra ref for the work item */ dlm 1517 fs/ocfs2/dlm/dlmrecovery.c dlm_init_work_item(dlm, item, dlm_mig_lockres_worker, buf); dlm 1521 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->work_lock); dlm 1522 fs/ocfs2/dlm/dlmrecovery.c list_add_tail(&item->list, &dlm->work_list); dlm 1523 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->work_lock); dlm 1524 fs/ocfs2/dlm/dlmrecovery.c queue_work(dlm->dlm_worker, &dlm->dispatched_work); dlm 1531 fs/ocfs2/dlm/dlmrecovery.c dlm_put(dlm); dlm 1544 fs/ocfs2/dlm/dlmrecovery.c struct dlm_ctxt *dlm; dlm 1551 fs/ocfs2/dlm/dlmrecovery.c dlm = item->dlm; dlm 1562 fs/ocfs2/dlm/dlmrecovery.c ret = dlm_lockres_master_requery(dlm, res, &real_master); dlm 1574 fs/ocfs2/dlm/dlmrecovery.c dlm_lockres_drop_inflight_ref(dlm, res); dlm 1585 fs/ocfs2/dlm/dlmrecovery.c ret = dlm_process_recovery_data(dlm, res, mres); dlm 1593 fs/ocfs2/dlm/dlmrecovery.c ret = dlm_finish_migration(dlm, res, mres->master); dlm 1610 fs/ocfs2/dlm/dlmrecovery.c static int dlm_lockres_master_requery(struct dlm_ctxt *dlm, dlm 1643 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 1644 fs/ocfs2/dlm/dlmrecovery.c dlm_node_iter_init(dlm->domain_map, &iter); dlm 1645 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 1649 fs/ocfs2/dlm/dlmrecovery.c if (nodenum == dlm->node_num) dlm 1651 fs/ocfs2/dlm/dlmrecovery.c ret = dlm_do_master_requery(dlm, res, nodenum, real_master); dlm 1668 fs/ocfs2/dlm/dlmrecovery.c int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, dlm 1676 fs/ocfs2/dlm/dlmrecovery.c req.node_idx = dlm->node_num; dlm 1681 fs/ocfs2/dlm/dlmrecovery.c ret = o2net_send_message(DLM_MASTER_REQUERY_MSG, dlm->key, dlm 1686 fs/ocfs2/dlm/dlmrecovery.c dlm->key, nodenum); dlm 1709 fs/ocfs2/dlm/dlmrecovery.c struct dlm_ctxt *dlm = data; dlm 1717 fs/ocfs2/dlm/dlmrecovery.c if (!dlm_grab(dlm)) { dlm 1725 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 1726 fs/ocfs2/dlm/dlmrecovery.c res = __dlm_lookup_lockres(dlm, req->name, req->namelen, hash); dlm 1730 fs/ocfs2/dlm/dlmrecovery.c if (master == dlm->node_num) { dlm 1731 fs/ocfs2/dlm/dlmrecovery.c int ret = dlm_dispatch_assert_master(dlm, res, dlm 1737 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 1738 fs/ocfs2/dlm/dlmrecovery.c dlm_put(dlm); dlm 1743 fs/ocfs2/dlm/dlmrecovery.c __dlm_lockres_grab_inflight_worker(dlm, res); dlm 1752 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 1755 fs/ocfs2/dlm/dlmrecovery.c dlm_put(dlm); dlm 1796 fs/ocfs2/dlm/dlmrecovery.c static int dlm_process_recovery_data(struct dlm_ctxt *dlm, dlm 1815 fs/ocfs2/dlm/dlmrecovery.c if (dlm_is_dummy_lock(dlm, ml, &from)) { dlm 1819 fs/ocfs2/dlm/dlmrecovery.c dlm->name, mres->lockname_len, mres->lockname, dlm 1822 fs/ocfs2/dlm/dlmrecovery.c dlm_lockres_set_refmap_bit(dlm, res, from); dlm 1836 fs/ocfs2/dlm/dlmrecovery.c if (ml->node == dlm->node_num) { dlm 1964 fs/ocfs2/dlm/dlmrecovery.c "lvb! type=%d\n", dlm->name, dlm 2004 fs/ocfs2/dlm/dlmrecovery.c "exists on this lockres!\n", dlm->name, dlm 2033 fs/ocfs2/dlm/dlmrecovery.c "setting refmap bit\n", dlm->name, dlm 2035 fs/ocfs2/dlm/dlmrecovery.c dlm_lockres_set_refmap_bit(dlm, res, ml->node); dlm 2044 fs/ocfs2/dlm/dlmrecovery.c dlm_lockres_drop_inflight_ref(dlm, res); dlm 2053 fs/ocfs2/dlm/dlmrecovery.c void dlm_move_lockres_to_recovery_list(struct dlm_ctxt *dlm, dlm 2060 fs/ocfs2/dlm/dlmrecovery.c assert_spin_locked(&dlm->spinlock); dlm 2066 fs/ocfs2/dlm/dlmrecovery.c dlm->name, res->lockname.len, res->lockname.name); dlm 2072 fs/ocfs2/dlm/dlmrecovery.c list_add_tail(&res->recovering, &dlm->reco.resources); dlm 2137 fs/ocfs2/dlm/dlmrecovery.c static void dlm_finish_local_lockres_recovery(struct dlm_ctxt *dlm, dlm 2144 fs/ocfs2/dlm/dlmrecovery.c assert_spin_locked(&dlm->spinlock); dlm 2146 fs/ocfs2/dlm/dlmrecovery.c list_for_each_entry_safe(res, next, &dlm->reco.resources, recovering) { dlm 2149 fs/ocfs2/dlm/dlmrecovery.c dlm->name, res->lockname.len, res->lockname.name, dlm 2155 fs/ocfs2/dlm/dlmrecovery.c dlm_change_lockres_owner(dlm, res, new_master); dlm 2158 fs/ocfs2/dlm/dlmrecovery.c __dlm_dirty_lockres(dlm, res); dlm 2170 fs/ocfs2/dlm/dlmrecovery.c bucket = dlm_lockres_hash(dlm, i); dlm 2183 fs/ocfs2/dlm/dlmrecovery.c res->owner != dlm->node_num) dlm 2194 fs/ocfs2/dlm/dlmrecovery.c dlm->name, res->lockname.len, res->lockname.name, dlm 2197 fs/ocfs2/dlm/dlmrecovery.c dlm_change_lockres_owner(dlm, res, new_master); dlm 2200 fs/ocfs2/dlm/dlmrecovery.c __dlm_dirty_lockres(dlm, res); dlm 2218 fs/ocfs2/dlm/dlmrecovery.c static void dlm_revalidate_lvb(struct dlm_ctxt *dlm, dlm 2227 fs/ocfs2/dlm/dlmrecovery.c assert_spin_locked(&dlm->spinlock); dlm 2230 fs/ocfs2/dlm/dlmrecovery.c if (res->owner == dlm->node_num) dlm 2237 fs/ocfs2/dlm/dlmrecovery.c search_node = dlm->node_num; dlm 2261 fs/ocfs2/dlm/dlmrecovery.c static void dlm_free_dead_locks(struct dlm_ctxt *dlm, dlm 2271 fs/ocfs2/dlm/dlmrecovery.c assert_spin_locked(&dlm->spinlock); dlm 2308 fs/ocfs2/dlm/dlmrecovery.c "dropping ref from lockres\n", dlm->name, dlm 2312 fs/ocfs2/dlm/dlmrecovery.c "but ref was not set\n", dlm->name, dlm 2317 fs/ocfs2/dlm/dlmrecovery.c dlm_lockres_clear_refmap_bit(dlm, res, dead_node); dlm 2320 fs/ocfs2/dlm/dlmrecovery.c "no locks and had not purged before dying\n", dlm->name, dlm 2322 fs/ocfs2/dlm/dlmrecovery.c dlm_lockres_clear_refmap_bit(dlm, res, dead_node); dlm 2326 fs/ocfs2/dlm/dlmrecovery.c __dlm_dirty_lockres(dlm, res); dlm 2329 fs/ocfs2/dlm/dlmrecovery.c static void dlm_do_local_recovery_cleanup(struct dlm_ctxt *dlm, u8 dead_node) dlm 2339 fs/ocfs2/dlm/dlmrecovery.c dlm_clean_master_list(dlm, dead_node); dlm 2356 fs/ocfs2/dlm/dlmrecovery.c bucket = dlm_lockres_hash(dlm, i); dlm 2368 fs/ocfs2/dlm/dlmrecovery.c dead_node, dlm->name); dlm 2382 fs/ocfs2/dlm/dlmrecovery.c __dlm_do_purge_lockres(dlm, res); dlm 2387 fs/ocfs2/dlm/dlmrecovery.c } else if (res->owner == dlm->node_num) dlm 2388 fs/ocfs2/dlm/dlmrecovery.c dlm_lockres_clear_refmap_bit(dlm, res, dead_node); dlm 2394 fs/ocfs2/dlm/dlmrecovery.c dlm_revalidate_lvb(dlm, res, dead_node); dlm 2401 fs/ocfs2/dlm/dlmrecovery.c dlm->name, res->lockname.len, dlm 2404 fs/ocfs2/dlm/dlmrecovery.c __dlm_do_purge_lockres(dlm, res); dlm 2410 fs/ocfs2/dlm/dlmrecovery.c dlm_move_lockres_to_recovery_list(dlm, res); dlm 2411 fs/ocfs2/dlm/dlmrecovery.c } else if (res->owner == dlm->node_num) { dlm 2412 fs/ocfs2/dlm/dlmrecovery.c dlm_free_dead_locks(dlm, res, dead_node); dlm 2413 fs/ocfs2/dlm/dlmrecovery.c __dlm_lockres_calc_usage(dlm, res); dlm 2418 fs/ocfs2/dlm/dlmrecovery.c dlm->name, res->lockname.len, dlm 2420 fs/ocfs2/dlm/dlmrecovery.c dlm_lockres_clear_refmap_bit(dlm, res, dead_node); dlm 2429 fs/ocfs2/dlm/dlmrecovery.c static void __dlm_hb_node_down(struct dlm_ctxt *dlm, int idx) dlm 2431 fs/ocfs2/dlm/dlmrecovery.c assert_spin_locked(&dlm->spinlock); dlm 2433 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.new_master == idx) { dlm 2435 fs/ocfs2/dlm/dlmrecovery.c dlm->name, idx); dlm 2436 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) { dlm 2441 fs/ocfs2/dlm/dlmrecovery.c "finalize1 state, clearing\n", dlm->name, idx); dlm 2442 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE; dlm 2443 fs/ocfs2/dlm/dlmrecovery.c __dlm_reset_recovery(dlm); dlm 2448 fs/ocfs2/dlm/dlmrecovery.c if (dlm->joining_node == idx) { dlm 2450 fs/ocfs2/dlm/dlmrecovery.c __dlm_set_joining_node(dlm, DLM_LOCK_RES_OWNER_UNKNOWN); dlm 2454 fs/ocfs2/dlm/dlmrecovery.c if (!test_bit(idx, dlm->live_nodes_map)) { dlm 2457 fs/ocfs2/dlm/dlmrecovery.c dlm->name, idx); dlm 2462 fs/ocfs2/dlm/dlmrecovery.c if (!test_bit(idx, dlm->domain_map)) { dlm 2469 fs/ocfs2/dlm/dlmrecovery.c clear_bit(idx, dlm->live_nodes_map); dlm 2472 fs/ocfs2/dlm/dlmrecovery.c if (!test_bit(idx, dlm->recovery_map)) dlm 2473 fs/ocfs2/dlm/dlmrecovery.c dlm_do_local_recovery_cleanup(dlm, idx); dlm 2476 fs/ocfs2/dlm/dlmrecovery.c dlm_hb_event_notify_attached(dlm, idx, 0); dlm 2479 fs/ocfs2/dlm/dlmrecovery.c clear_bit(idx, dlm->domain_map); dlm 2480 fs/ocfs2/dlm/dlmrecovery.c clear_bit(idx, dlm->exit_domain_map); dlm 2483 fs/ocfs2/dlm/dlmrecovery.c wake_up(&dlm->migration_wq); dlm 2485 fs/ocfs2/dlm/dlmrecovery.c set_bit(idx, dlm->recovery_map); dlm 2490 fs/ocfs2/dlm/dlmrecovery.c struct dlm_ctxt *dlm = data; dlm 2492 fs/ocfs2/dlm/dlmrecovery.c if (!dlm_grab(dlm)) dlm 2499 fs/ocfs2/dlm/dlmrecovery.c if (test_bit(idx, dlm->domain_map)) dlm 2500 fs/ocfs2/dlm/dlmrecovery.c dlm_fire_domain_eviction_callbacks(dlm, idx); dlm 2502 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 2503 fs/ocfs2/dlm/dlmrecovery.c __dlm_hb_node_down(dlm, idx); dlm 2504 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 2506 fs/ocfs2/dlm/dlmrecovery.c dlm_put(dlm); dlm 2511 fs/ocfs2/dlm/dlmrecovery.c struct dlm_ctxt *dlm = data; dlm 2513 fs/ocfs2/dlm/dlmrecovery.c if (!dlm_grab(dlm)) dlm 2516 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 2517 fs/ocfs2/dlm/dlmrecovery.c set_bit(idx, dlm->live_nodes_map); dlm 2520 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 2522 fs/ocfs2/dlm/dlmrecovery.c dlm_put(dlm); dlm 2527 fs/ocfs2/dlm/dlmrecovery.c struct dlm_ctxt *dlm = astdata; dlm 2529 fs/ocfs2/dlm/dlmrecovery.c dlm->node_num, dlm->name); dlm 2533 fs/ocfs2/dlm/dlmrecovery.c struct dlm_ctxt *dlm = astdata; dlm 2535 fs/ocfs2/dlm/dlmrecovery.c dlm->node_num, dlm->name); dlm 2554 fs/ocfs2/dlm/dlmrecovery.c static int dlm_pick_recovery_master(struct dlm_ctxt *dlm) dlm 2561 fs/ocfs2/dlm/dlmrecovery.c dlm->name, jiffies, dlm->reco.dead_node, dlm->node_num); dlm 2565 fs/ocfs2/dlm/dlmrecovery.c ret = dlmlock(dlm, LKM_EXMODE, &lksb, LKM_NOQUEUE|LKM_RECOVERY, dlm 2567 fs/ocfs2/dlm/dlmrecovery.c dlm_reco_ast, dlm, dlm_reco_bast); dlm 2570 fs/ocfs2/dlm/dlmrecovery.c dlm->name, ret, lksb.status); dlm 2574 fs/ocfs2/dlm/dlmrecovery.c dlm->name, dlm->node_num); dlm 2578 fs/ocfs2/dlm/dlmrecovery.c if (dlm_reco_master_ready(dlm)) { dlm 2580 fs/ocfs2/dlm/dlmrecovery.c "do the recovery\n", dlm->name, dlm 2581 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.new_master); dlm 2587 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 2588 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) { dlm 2591 fs/ocfs2/dlm/dlmrecovery.c "node got recovered already\n", dlm->name); dlm 2592 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM) { dlm 2595 fs/ocfs2/dlm/dlmrecovery.c dlm->name, dlm->reco.new_master); dlm 2599 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 2606 fs/ocfs2/dlm/dlmrecovery.c "begin_reco now\n", dlm->name, dlm 2607 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node, dlm->node_num); dlm 2608 fs/ocfs2/dlm/dlmrecovery.c status = dlm_send_begin_reco_message(dlm, dlm 2609 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node); dlm 2614 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 2615 fs/ocfs2/dlm/dlmrecovery.c dlm_set_reco_master(dlm, dlm->node_num); dlm 2616 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 2621 fs/ocfs2/dlm/dlmrecovery.c ret = dlmunlock(dlm, &lksb, 0, dlm_reco_unlock_ast, dlm); dlm 2624 fs/ocfs2/dlm/dlmrecovery.c ret = dlmunlock(dlm, &lksb, LKM_CANCEL, dlm_reco_unlock_ast, dlm); dlm 2637 fs/ocfs2/dlm/dlmrecovery.c dlm->name, dlm->node_num); dlm 2641 fs/ocfs2/dlm/dlmrecovery.c wait_event_timeout(dlm->dlm_reco_thread_wq, dlm 2642 fs/ocfs2/dlm/dlmrecovery.c dlm_reco_master_ready(dlm), dlm 2644 fs/ocfs2/dlm/dlmrecovery.c if (!dlm_reco_master_ready(dlm)) { dlm 2646 fs/ocfs2/dlm/dlmrecovery.c dlm->name); dlm 2651 fs/ocfs2/dlm/dlmrecovery.c dlm->name, dlm->reco.new_master, dlm->reco.dead_node); dlm 2655 fs/ocfs2/dlm/dlmrecovery.c dlm->name, dlm->node_num); dlm 2662 fs/ocfs2/dlm/dlmrecovery.c "lksb.status=%s\n", dlm->name, dlm_errname(ret), dlm 2664 fs/ocfs2/dlm/dlmrecovery.c res = dlm_lookup_lockres(dlm, DLM_RECOVERY_LOCK_NAME, dlm 2678 fs/ocfs2/dlm/dlmrecovery.c static int dlm_send_begin_reco_message(struct dlm_ctxt *dlm, u8 dead_node) dlm 2686 fs/ocfs2/dlm/dlmrecovery.c mlog(0, "%s: dead node is %u\n", dlm->name, dead_node); dlm 2688 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 2689 fs/ocfs2/dlm/dlmrecovery.c dlm_node_iter_init(dlm->domain_map, &iter); dlm 2690 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 2695 fs/ocfs2/dlm/dlmrecovery.c br.node_idx = dlm->node_num; dlm 2705 fs/ocfs2/dlm/dlmrecovery.c if (nodenum == dlm->node_num) { dlm 2713 fs/ocfs2/dlm/dlmrecovery.c ret = o2net_send_message(DLM_BEGIN_RECO_MSG, dlm->key, dlm 2722 fs/ocfs2/dlm/dlmrecovery.c "begin reco msg (%d)\n", dlm->name, nodenum, ret); dlm 2734 fs/ocfs2/dlm/dlmrecovery.c "to complete, backoff for a bit\n", dlm->name, dlm 2746 fs/ocfs2/dlm/dlmrecovery.c "returned %d\n", dlm->name, nodenum, ret); dlm 2747 fs/ocfs2/dlm/dlmrecovery.c res = dlm_lookup_lockres(dlm, DLM_RECOVERY_LOCK_NAME, dlm 2768 fs/ocfs2/dlm/dlmrecovery.c struct dlm_ctxt *dlm = data; dlm 2772 fs/ocfs2/dlm/dlmrecovery.c if (!dlm_grab(dlm)) dlm 2775 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 2776 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) { dlm 2779 fs/ocfs2/dlm/dlmrecovery.c dlm->name, br->node_idx, br->dead_node, dlm 2780 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node, dlm->reco.new_master); dlm 2781 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 2782 fs/ocfs2/dlm/dlmrecovery.c dlm_put(dlm); dlm 2785 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 2788 fs/ocfs2/dlm/dlmrecovery.c dlm->name, br->node_idx, br->dead_node, dlm 2789 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node, dlm->reco.new_master); dlm 2791 fs/ocfs2/dlm/dlmrecovery.c dlm_fire_domain_eviction_callbacks(dlm, br->dead_node); dlm 2793 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 2794 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM) { dlm 2795 fs/ocfs2/dlm/dlmrecovery.c if (test_bit(dlm->reco.new_master, dlm->recovery_map)) { dlm 2797 fs/ocfs2/dlm/dlmrecovery.c "to %u\n", dlm->name, dlm->reco.new_master, dlm 2801 fs/ocfs2/dlm/dlmrecovery.c "to %u\n", dlm->name, dlm->reco.new_master, dlm 2806 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.dead_node != O2NM_INVALID_NODE_NUM) { dlm 2808 fs/ocfs2/dlm/dlmrecovery.c "node %u changing it to %u\n", dlm->name, dlm 2809 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node, br->node_idx, br->dead_node); dlm 2811 fs/ocfs2/dlm/dlmrecovery.c dlm_set_reco_master(dlm, br->node_idx); dlm 2812 fs/ocfs2/dlm/dlmrecovery.c dlm_set_reco_dead_node(dlm, br->dead_node); dlm 2813 fs/ocfs2/dlm/dlmrecovery.c if (!test_bit(br->dead_node, dlm->recovery_map)) { dlm 2817 fs/ocfs2/dlm/dlmrecovery.c if (!test_bit(br->dead_node, dlm->domain_map) || dlm 2818 fs/ocfs2/dlm/dlmrecovery.c !test_bit(br->dead_node, dlm->live_nodes_map)) dlm 2824 fs/ocfs2/dlm/dlmrecovery.c set_bit(br->dead_node, dlm->domain_map); dlm 2825 fs/ocfs2/dlm/dlmrecovery.c set_bit(br->dead_node, dlm->live_nodes_map); dlm 2826 fs/ocfs2/dlm/dlmrecovery.c __dlm_hb_node_down(dlm, br->dead_node); dlm 2828 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 2830 fs/ocfs2/dlm/dlmrecovery.c dlm_kick_recovery_thread(dlm); dlm 2833 fs/ocfs2/dlm/dlmrecovery.c dlm->name, br->node_idx, br->dead_node, dlm 2834 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.dead_node, dlm->reco.new_master); dlm 2836 fs/ocfs2/dlm/dlmrecovery.c dlm_put(dlm); dlm 2841 fs/ocfs2/dlm/dlmrecovery.c static int dlm_send_finalize_reco_message(struct dlm_ctxt *dlm) dlm 2851 fs/ocfs2/dlm/dlmrecovery.c "stage %d\n", dlm->name, dlm->reco.dead_node, stage); dlm 2853 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 2854 fs/ocfs2/dlm/dlmrecovery.c dlm_node_iter_init(dlm->domain_map, &iter); dlm 2855 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 2859 fs/ocfs2/dlm/dlmrecovery.c fr.node_idx = dlm->node_num; dlm 2860 fs/ocfs2/dlm/dlmrecovery.c fr.dead_node = dlm->reco.dead_node; dlm 2865 fs/ocfs2/dlm/dlmrecovery.c if (nodenum == dlm->node_num) dlm 2867 fs/ocfs2/dlm/dlmrecovery.c ret = o2net_send_message(DLM_FINALIZE_RECO_MSG, dlm->key, dlm 2874 fs/ocfs2/dlm/dlmrecovery.c dlm->key, nodenum); dlm 2900 fs/ocfs2/dlm/dlmrecovery.c struct dlm_ctxt *dlm = data; dlm 2905 fs/ocfs2/dlm/dlmrecovery.c if (!dlm_grab(dlm)) dlm 2912 fs/ocfs2/dlm/dlmrecovery.c "node %u (%u:%u)\n", dlm->name, fr->node_idx, stage, dlm 2913 fs/ocfs2/dlm/dlmrecovery.c fr->dead_node, dlm->reco.dead_node, dlm->reco.new_master); dlm 2915 fs/ocfs2/dlm/dlmrecovery.c spin_lock(&dlm->spinlock); dlm 2917 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.new_master != fr->node_idx) { dlm 2920 fs/ocfs2/dlm/dlmrecovery.c fr->node_idx, dlm->reco.new_master, fr->dead_node); dlm 2923 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.dead_node != fr->dead_node) { dlm 2926 fs/ocfs2/dlm/dlmrecovery.c fr->node_idx, fr->dead_node, dlm->reco.dead_node); dlm 2932 fs/ocfs2/dlm/dlmrecovery.c dlm_finish_local_lockres_recovery(dlm, fr->dead_node, fr->node_idx); dlm 2933 fs/ocfs2/dlm/dlmrecovery.c if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) { dlm 2937 fs/ocfs2/dlm/dlmrecovery.c dlm->name, fr->node_idx, fr->dead_node); dlm 2938 fs/ocfs2/dlm/dlmrecovery.c dlm_print_reco_node_status(dlm); dlm 2941 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.state |= DLM_RECO_STATE_FINALIZE; dlm 2942 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 2945 fs/ocfs2/dlm/dlmrecovery.c if (!(dlm->reco.state & DLM_RECO_STATE_FINALIZE)) { dlm 2949 fs/ocfs2/dlm/dlmrecovery.c dlm->name, fr->node_idx, fr->dead_node); dlm 2950 fs/ocfs2/dlm/dlmrecovery.c dlm_print_reco_node_status(dlm); dlm 2953 fs/ocfs2/dlm/dlmrecovery.c dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE; dlm 2954 fs/ocfs2/dlm/dlmrecovery.c __dlm_reset_recovery(dlm); dlm 2955 fs/ocfs2/dlm/dlmrecovery.c spin_unlock(&dlm->spinlock); dlm 2956 fs/ocfs2/dlm/dlmrecovery.c dlm_kick_recovery_thread(dlm); dlm 2961 fs/ocfs2/dlm/dlmrecovery.c dlm->name, fr->node_idx, dlm->reco.dead_node, dlm->reco.new_master); dlm 2963 fs/ocfs2/dlm/dlmrecovery.c dlm_put(dlm); dlm 40 fs/ocfs2/dlm/dlmthread.c static void dlm_flush_asts(struct dlm_ctxt *dlm); dlm 42 fs/ocfs2/dlm/dlmthread.c #define dlm_lock_is_remote(dlm, lock) ((lock)->ml.node != (dlm)->node_num) dlm 110 fs/ocfs2/dlm/dlmthread.c void __dlm_lockres_calc_usage(struct dlm_ctxt *dlm, dlm 113 fs/ocfs2/dlm/dlmthread.c assert_spin_locked(&dlm->spinlock); dlm 119 fs/ocfs2/dlm/dlmthread.c dlm->name, res->lockname.len, res->lockname.name); dlm 123 fs/ocfs2/dlm/dlmthread.c list_add_tail(&res->purge, &dlm->purge_list); dlm 124 fs/ocfs2/dlm/dlmthread.c dlm->purge_count++; dlm 128 fs/ocfs2/dlm/dlmthread.c dlm->name, res->lockname.len, res->lockname.name); dlm 132 fs/ocfs2/dlm/dlmthread.c dlm->purge_count--; dlm 136 fs/ocfs2/dlm/dlmthread.c void dlm_lockres_calc_usage(struct dlm_ctxt *dlm, dlm 139 fs/ocfs2/dlm/dlmthread.c spin_lock(&dlm->spinlock); dlm 142 fs/ocfs2/dlm/dlmthread.c __dlm_lockres_calc_usage(dlm, res); dlm 145 fs/ocfs2/dlm/dlmthread.c spin_unlock(&dlm->spinlock); dlm 154 fs/ocfs2/dlm/dlmthread.c void __dlm_do_purge_lockres(struct dlm_ctxt *dlm, dlm 157 fs/ocfs2/dlm/dlmthread.c assert_spin_locked(&dlm->spinlock); dlm 162 fs/ocfs2/dlm/dlmthread.c dlm->name, res->lockname.len, res->lockname.name); dlm 165 fs/ocfs2/dlm/dlmthread.c dlm->purge_count--; dlm 170 fs/ocfs2/dlm/dlmthread.c dlm->name, res->lockname.len, res->lockname.name); dlm 175 fs/ocfs2/dlm/dlmthread.c __dlm_unhash_lockres(dlm, res); dlm 177 fs/ocfs2/dlm/dlmthread.c spin_lock(&dlm->track_lock); dlm 182 fs/ocfs2/dlm/dlmthread.c dlm->name, res->lockname.len, res->lockname.name); dlm 185 fs/ocfs2/dlm/dlmthread.c spin_unlock(&dlm->track_lock); dlm 194 fs/ocfs2/dlm/dlmthread.c static void dlm_purge_lockres(struct dlm_ctxt *dlm, dlm 200 fs/ocfs2/dlm/dlmthread.c assert_spin_locked(&dlm->spinlock); dlm 203 fs/ocfs2/dlm/dlmthread.c master = (res->owner == dlm->node_num); dlm 205 fs/ocfs2/dlm/dlmthread.c mlog(0, "%s: Purging res %.*s, master %d\n", dlm->name, dlm 211 fs/ocfs2/dlm/dlmthread.c dlm->name, res->lockname.len, res->lockname.name); dlm 219 fs/ocfs2/dlm/dlmthread.c spin_unlock(&dlm->spinlock); dlm 227 fs/ocfs2/dlm/dlmthread.c ret = dlm_drop_lockres_ref(dlm, res); dlm 232 fs/ocfs2/dlm/dlmthread.c spin_lock(&dlm->spinlock); dlm 238 fs/ocfs2/dlm/dlmthread.c dlm->name, res->lockname.len, res->lockname.name, master); dlm 241 fs/ocfs2/dlm/dlmthread.c dlm->purge_count--; dlm 246 fs/ocfs2/dlm/dlmthread.c dlm->name, res->lockname.len, res->lockname.name); dlm 253 fs/ocfs2/dlm/dlmthread.c dlm->name, res->lockname.len, res->lockname.name); dlm 258 fs/ocfs2/dlm/dlmthread.c __dlm_unhash_lockres(dlm, res); dlm 260 fs/ocfs2/dlm/dlmthread.c spin_lock(&dlm->track_lock); dlm 268 fs/ocfs2/dlm/dlmthread.c spin_unlock(&dlm->track_lock); dlm 280 fs/ocfs2/dlm/dlmthread.c static void dlm_run_purge_list(struct dlm_ctxt *dlm, dlm 287 fs/ocfs2/dlm/dlmthread.c spin_lock(&dlm->spinlock); dlm 288 fs/ocfs2/dlm/dlmthread.c run_max = dlm->purge_count; dlm 290 fs/ocfs2/dlm/dlmthread.c while(run_max && !list_empty(&dlm->purge_list)) { dlm 293 fs/ocfs2/dlm/dlmthread.c lockres = list_entry(dlm->purge_list.next, dlm 322 fs/ocfs2/dlm/dlmthread.c dlm->name, lockres->lockname.len, dlm 326 fs/ocfs2/dlm/dlmthread.c list_move_tail(&lockres->purge, &dlm->purge_list); dlm 333 fs/ocfs2/dlm/dlmthread.c dlm_purge_lockres(dlm, lockres); dlm 338 fs/ocfs2/dlm/dlmthread.c cond_resched_lock(&dlm->spinlock); dlm 341 fs/ocfs2/dlm/dlmthread.c spin_unlock(&dlm->spinlock); dlm 344 fs/ocfs2/dlm/dlmthread.c static void dlm_shuffle_lists(struct dlm_ctxt *dlm, dlm 356 fs/ocfs2/dlm/dlmthread.c assert_spin_locked(&dlm->ast_lock); dlm 365 fs/ocfs2/dlm/dlmthread.c mlog(0, "%s: res %.*s has locks on the convert queue\n", dlm->name, dlm 371 fs/ocfs2/dlm/dlmthread.c dlm->name, res->lockname.len, res->lockname.name); dlm 383 fs/ocfs2/dlm/dlmthread.c __dlm_queue_bast(dlm, lock); dlm 400 fs/ocfs2/dlm/dlmthread.c __dlm_queue_bast(dlm, lock); dlm 414 fs/ocfs2/dlm/dlmthread.c "%d => %d, node %u\n", dlm->name, res->lockname.len, dlm 431 fs/ocfs2/dlm/dlmthread.c __dlm_queue_ast(dlm, target); dlm 448 fs/ocfs2/dlm/dlmthread.c __dlm_queue_bast(dlm, lock); dlm 462 fs/ocfs2/dlm/dlmthread.c __dlm_queue_bast(dlm, lock); dlm 476 fs/ocfs2/dlm/dlmthread.c "node %u\n", dlm->name, res->lockname.len, dlm 491 fs/ocfs2/dlm/dlmthread.c __dlm_queue_ast(dlm, target); dlm 501 fs/ocfs2/dlm/dlmthread.c void dlm_kick_thread(struct dlm_ctxt *dlm, struct dlm_lock_resource *res) dlm 504 fs/ocfs2/dlm/dlmthread.c spin_lock(&dlm->spinlock); dlm 506 fs/ocfs2/dlm/dlmthread.c __dlm_dirty_lockres(dlm, res); dlm 508 fs/ocfs2/dlm/dlmthread.c spin_unlock(&dlm->spinlock); dlm 510 fs/ocfs2/dlm/dlmthread.c wake_up(&dlm->dlm_thread_wq); dlm 513 fs/ocfs2/dlm/dlmthread.c void __dlm_dirty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res) dlm 515 fs/ocfs2/dlm/dlmthread.c assert_spin_locked(&dlm->spinlock); dlm 519 fs/ocfs2/dlm/dlmthread.c if (res->owner == dlm->node_num) { dlm 527 fs/ocfs2/dlm/dlmthread.c list_add_tail(&res->dirty, &dlm->dirty_list); dlm 532 fs/ocfs2/dlm/dlmthread.c mlog(0, "%s: res %.*s\n", dlm->name, res->lockname.len, dlm 538 fs/ocfs2/dlm/dlmthread.c int dlm_launch_thread(struct dlm_ctxt *dlm) dlm 542 fs/ocfs2/dlm/dlmthread.c dlm->dlm_thread_task = kthread_run(dlm_thread, dlm, "dlm-%s", dlm 543 fs/ocfs2/dlm/dlmthread.c dlm->name); dlm 544 fs/ocfs2/dlm/dlmthread.c if (IS_ERR(dlm->dlm_thread_task)) { dlm 545 fs/ocfs2/dlm/dlmthread.c mlog_errno(PTR_ERR(dlm->dlm_thread_task)); dlm 546 fs/ocfs2/dlm/dlmthread.c dlm->dlm_thread_task = NULL; dlm 553 fs/ocfs2/dlm/dlmthread.c void dlm_complete_thread(struct dlm_ctxt *dlm) dlm 555 fs/ocfs2/dlm/dlmthread.c if (dlm->dlm_thread_task) { dlm 557 fs/ocfs2/dlm/dlmthread.c kthread_stop(dlm->dlm_thread_task); dlm 558 fs/ocfs2/dlm/dlmthread.c dlm->dlm_thread_task = NULL; dlm 562 fs/ocfs2/dlm/dlmthread.c static int dlm_dirty_list_empty(struct dlm_ctxt *dlm) dlm 566 fs/ocfs2/dlm/dlmthread.c spin_lock(&dlm->spinlock); dlm 567 fs/ocfs2/dlm/dlmthread.c empty = list_empty(&dlm->dirty_list); dlm 568 fs/ocfs2/dlm/dlmthread.c spin_unlock(&dlm->spinlock); dlm 573 fs/ocfs2/dlm/dlmthread.c static void dlm_flush_asts(struct dlm_ctxt *dlm) dlm 580 fs/ocfs2/dlm/dlmthread.c spin_lock(&dlm->ast_lock); dlm 581 fs/ocfs2/dlm/dlmthread.c while (!list_empty(&dlm->pending_asts)) { dlm 582 fs/ocfs2/dlm/dlmthread.c lock = list_entry(dlm->pending_asts.next, dlm 588 fs/ocfs2/dlm/dlmthread.c "node %u\n", dlm->name, res->lockname.len, dlm 599 fs/ocfs2/dlm/dlmthread.c spin_unlock(&dlm->ast_lock); dlm 601 fs/ocfs2/dlm/dlmthread.c if (lock->ml.node != dlm->node_num) { dlm 602 fs/ocfs2/dlm/dlmthread.c ret = dlm_do_remote_ast(dlm, res, lock); dlm 606 fs/ocfs2/dlm/dlmthread.c dlm_do_local_ast(dlm, res, lock); dlm 608 fs/ocfs2/dlm/dlmthread.c spin_lock(&dlm->ast_lock); dlm 614 fs/ocfs2/dlm/dlmthread.c "one\n", dlm->name, res->lockname.len, dlm 622 fs/ocfs2/dlm/dlmthread.c dlm_lockres_release_ast(dlm, res); dlm 625 fs/ocfs2/dlm/dlmthread.c while (!list_empty(&dlm->pending_basts)) { dlm 626 fs/ocfs2/dlm/dlmthread.c lock = list_entry(dlm->pending_basts.next, dlm 644 fs/ocfs2/dlm/dlmthread.c spin_unlock(&dlm->ast_lock); dlm 648 fs/ocfs2/dlm/dlmthread.c dlm->name, res->lockname.len, res->lockname.name, dlm 653 fs/ocfs2/dlm/dlmthread.c if (lock->ml.node != dlm->node_num) { dlm 654 fs/ocfs2/dlm/dlmthread.c ret = dlm_send_proxy_bast(dlm, res, lock, hi); dlm 658 fs/ocfs2/dlm/dlmthread.c dlm_do_local_bast(dlm, res, lock, hi); dlm 660 fs/ocfs2/dlm/dlmthread.c spin_lock(&dlm->ast_lock); dlm 666 fs/ocfs2/dlm/dlmthread.c "one\n", dlm->name, res->lockname.len, dlm 674 fs/ocfs2/dlm/dlmthread.c dlm_lockres_release_ast(dlm, res); dlm 676 fs/ocfs2/dlm/dlmthread.c wake_up(&dlm->ast_wq); dlm 677 fs/ocfs2/dlm/dlmthread.c spin_unlock(&dlm->ast_lock); dlm 688 fs/ocfs2/dlm/dlmthread.c struct dlm_ctxt *dlm = data; dlm 691 fs/ocfs2/dlm/dlmthread.c mlog(0, "dlm thread running for %s...\n", dlm->name); dlm 700 fs/ocfs2/dlm/dlmthread.c dlm_run_purge_list(dlm, dlm_shutting_down(dlm)); dlm 709 fs/ocfs2/dlm/dlmthread.c spin_lock(&dlm->spinlock); dlm 710 fs/ocfs2/dlm/dlmthread.c while (!list_empty(&dlm->dirty_list)) { dlm 712 fs/ocfs2/dlm/dlmthread.c res = list_entry(dlm->dirty_list.next, dlm 724 fs/ocfs2/dlm/dlmthread.c spin_unlock(&dlm->spinlock); dlm 731 fs/ocfs2/dlm/dlmthread.c spin_lock(&dlm->ast_lock); dlm 733 fs/ocfs2/dlm/dlmthread.c if (res->owner != dlm->node_num) { dlm 736 fs/ocfs2/dlm/dlmthread.c " dirty %d\n", dlm->name, dlm 742 fs/ocfs2/dlm/dlmthread.c BUG_ON(res->owner != dlm->node_num); dlm 754 fs/ocfs2/dlm/dlmthread.c spin_unlock(&dlm->ast_lock); dlm 756 fs/ocfs2/dlm/dlmthread.c "shuffle, state %d\n", dlm->name, dlm 769 fs/ocfs2/dlm/dlmthread.c dlm_shuffle_lists(dlm, res); dlm 772 fs/ocfs2/dlm/dlmthread.c spin_unlock(&dlm->ast_lock); dlm 774 fs/ocfs2/dlm/dlmthread.c dlm_lockres_calc_usage(dlm, res); dlm 778 fs/ocfs2/dlm/dlmthread.c spin_lock(&dlm->spinlock); dlm 783 fs/ocfs2/dlm/dlmthread.c __dlm_dirty_lockres(dlm, res); dlm 792 fs/ocfs2/dlm/dlmthread.c dlm->name); dlm 797 fs/ocfs2/dlm/dlmthread.c spin_unlock(&dlm->spinlock); dlm 798 fs/ocfs2/dlm/dlmthread.c dlm_flush_asts(dlm); dlm 806 fs/ocfs2/dlm/dlmthread.c wait_event_interruptible_timeout(dlm->dlm_thread_wq, dlm 807 fs/ocfs2/dlm/dlmthread.c !dlm_dirty_list_empty(dlm) || dlm 43 fs/ocfs2/dlm/dlmunlock.c static enum dlm_status dlm_get_cancel_actions(struct dlm_ctxt *dlm, dlm 48 fs/ocfs2/dlm/dlmunlock.c static enum dlm_status dlm_get_unlock_actions(struct dlm_ctxt *dlm, dlm 54 fs/ocfs2/dlm/dlmunlock.c static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm, dlm 83 fs/ocfs2/dlm/dlmunlock.c static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm, dlm 100 fs/ocfs2/dlm/dlmunlock.c BUG_ON(res->owner != dlm->node_num); dlm 102 fs/ocfs2/dlm/dlmunlock.c BUG_ON(res->owner == dlm->node_num); dlm 104 fs/ocfs2/dlm/dlmunlock.c spin_lock(&dlm->ast_lock); dlm 108 fs/ocfs2/dlm/dlmunlock.c spin_unlock(&dlm->ast_lock); dlm 142 fs/ocfs2/dlm/dlmunlock.c status = dlm_get_cancel_actions(dlm, res, lock, lksb, &actions); dlm 144 fs/ocfs2/dlm/dlmunlock.c status = dlm_get_unlock_actions(dlm, res, lock, lksb, &actions); dlm 168 fs/ocfs2/dlm/dlmunlock.c status = dlm_send_remote_unlock_request(dlm, res, lock, lksb, dlm 187 fs/ocfs2/dlm/dlmunlock.c dlm->name, res->lockname.len, dlm 283 fs/ocfs2/dlm/dlmunlock.c static inline enum dlm_status dlmunlock_master(struct dlm_ctxt *dlm, dlm 290 fs/ocfs2/dlm/dlmunlock.c return dlmunlock_common(dlm, res, lock, lksb, flags, call_ast, 1); dlm 293 fs/ocfs2/dlm/dlmunlock.c static inline enum dlm_status dlmunlock_remote(struct dlm_ctxt *dlm, dlm 299 fs/ocfs2/dlm/dlmunlock.c return dlmunlock_common(dlm, res, lock, lksb, flags, call_ast, 0); dlm 309 fs/ocfs2/dlm/dlmunlock.c static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm, dlm 325 fs/ocfs2/dlm/dlmunlock.c if (owner == dlm->node_num) { dlm 330 fs/ocfs2/dlm/dlmunlock.c "migration, re-evaluate now\n", dlm->name, dlm 336 fs/ocfs2/dlm/dlmunlock.c unlock.node_idx = dlm->node_num; dlm 352 fs/ocfs2/dlm/dlmunlock.c tmpret = o2net_send_message_vec(DLM_UNLOCK_LOCK_MSG, dlm->key, dlm 361 fs/ocfs2/dlm/dlmunlock.c "node %u\n", tmpret, DLM_UNLOCK_LOCK_MSG, dlm->key, owner); dlm 370 fs/ocfs2/dlm/dlmunlock.c if (dlm_is_node_dead(dlm, owner)) dlm 394 fs/ocfs2/dlm/dlmunlock.c struct dlm_ctxt *dlm = data; dlm 423 fs/ocfs2/dlm/dlmunlock.c if (!dlm_grab(dlm)) dlm 426 fs/ocfs2/dlm/dlmunlock.c mlog_bug_on_msg(!dlm_domain_fully_joined(dlm), dlm 427 fs/ocfs2/dlm/dlmunlock.c "Domain %s not fully joined!\n", dlm->name); dlm 431 fs/ocfs2/dlm/dlmunlock.c res = dlm_lookup_lockres(dlm, unlock->name, unlock->namelen); dlm 458 fs/ocfs2/dlm/dlmunlock.c if (res->owner != dlm->node_num) { dlm 499 fs/ocfs2/dlm/dlmunlock.c status = dlmunlock_master(dlm, res, lock, lksb, flags, &ignore); dlm 506 fs/ocfs2/dlm/dlmunlock.c dlm_lockres_calc_usage(dlm, res); dlm 507 fs/ocfs2/dlm/dlmunlock.c dlm_kick_thread(dlm, res); dlm 522 fs/ocfs2/dlm/dlmunlock.c dlm_put(dlm); dlm 528 fs/ocfs2/dlm/dlmunlock.c static enum dlm_status dlm_get_cancel_actions(struct dlm_ctxt *dlm, dlm 560 fs/ocfs2/dlm/dlmunlock.c static enum dlm_status dlm_get_unlock_actions(struct dlm_ctxt *dlm, dlm 587 fs/ocfs2/dlm/dlmunlock.c enum dlm_status dlmunlock(struct dlm_ctxt *dlm, struct dlm_lockstatus *lksb, dlm 628 fs/ocfs2/dlm/dlmunlock.c is_master = (res->owner == dlm->node_num); dlm 634 fs/ocfs2/dlm/dlmunlock.c status = dlmunlock_master(dlm, res, lock, lksb, flags, dlm 639 fs/ocfs2/dlm/dlmunlock.c status = dlmunlock_remote(dlm, res, lock, lksb, flags, dlm 674 fs/ocfs2/dlm/dlmunlock.c dlm_kick_thread(dlm, NULL); dlm 675 fs/ocfs2/dlm/dlmunlock.c wait_event(dlm->ast_wq, dlm 676 fs/ocfs2/dlm/dlmunlock.c dlm_lock_basts_flushed(dlm, lock)); dlm 686 fs/ocfs2/dlm/dlmunlock.c dlm_kick_thread(dlm, res); dlm 690 fs/ocfs2/dlm/dlmunlock.c dlm_lockres_calc_usage(dlm, res); dlm 324 fs/ocfs2/stack_o2cb.c struct dlm_ctxt *dlm; dlm 357 fs/ocfs2/stack_o2cb.c dlm = dlm_register_domain(conn->cc_name, dlm_key, &fs_version); dlm 358 fs/ocfs2/stack_o2cb.c if (IS_ERR(dlm)) { dlm 359 fs/ocfs2/stack_o2cb.c rc = PTR_ERR(dlm); dlm 366 fs/ocfs2/stack_o2cb.c conn->cc_lockspace = dlm; dlm 368 fs/ocfs2/stack_o2cb.c dlm_register_eviction_cb(dlm, &priv->op_eviction_cb); dlm 380 fs/ocfs2/stack_o2cb.c struct dlm_ctxt *dlm = conn->cc_lockspace; dlm 387 fs/ocfs2/stack_o2cb.c dlm_unregister_domain(dlm);