Lines Matching refs:dlm

58 static enum dlm_status dlm_get_cancel_actions(struct dlm_ctxt *dlm,
63 static enum dlm_status dlm_get_unlock_actions(struct dlm_ctxt *dlm,
69 static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm,
98 static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm, in dlmunlock_common() argument
115 BUG_ON(res->owner != dlm->node_num); in dlmunlock_common()
117 BUG_ON(res->owner == dlm->node_num); in dlmunlock_common()
119 spin_lock(&dlm->ast_lock); in dlmunlock_common()
123 spin_unlock(&dlm->ast_lock); in dlmunlock_common()
157 status = dlm_get_cancel_actions(dlm, res, lock, lksb, &actions); in dlmunlock_common()
159 status = dlm_get_unlock_actions(dlm, res, lock, lksb, &actions); in dlmunlock_common()
183 status = dlm_send_remote_unlock_request(dlm, res, lock, lksb, in dlmunlock_common()
202 dlm->name, res->lockname.len, in dlmunlock_common()
298 static inline enum dlm_status dlmunlock_master(struct dlm_ctxt *dlm, in dlmunlock_master() argument
305 return dlmunlock_common(dlm, res, lock, lksb, flags, call_ast, 1); in dlmunlock_master()
308 static inline enum dlm_status dlmunlock_remote(struct dlm_ctxt *dlm, in dlmunlock_remote() argument
314 return dlmunlock_common(dlm, res, lock, lksb, flags, call_ast, 0); in dlmunlock_remote()
324 static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm, in dlm_send_remote_unlock_request() argument
340 if (owner == dlm->node_num) { in dlm_send_remote_unlock_request()
345 "migration, re-evaluate now\n", dlm->name, in dlm_send_remote_unlock_request()
351 unlock.node_idx = dlm->node_num; in dlm_send_remote_unlock_request()
367 tmpret = o2net_send_message_vec(DLM_UNLOCK_LOCK_MSG, dlm->key, in dlm_send_remote_unlock_request()
376 "node %u\n", tmpret, DLM_UNLOCK_LOCK_MSG, dlm->key, owner); in dlm_send_remote_unlock_request()
385 if (dlm_is_node_dead(dlm, owner)) in dlm_send_remote_unlock_request()
409 struct dlm_ctxt *dlm = data; in dlm_unlock_lock_handler() local
438 if (!dlm_grab(dlm)) in dlm_unlock_lock_handler()
441 mlog_bug_on_msg(!dlm_domain_fully_joined(dlm), in dlm_unlock_lock_handler()
442 "Domain %s not fully joined!\n", dlm->name); in dlm_unlock_lock_handler()
446 res = dlm_lookup_lockres(dlm, unlock->name, unlock->namelen); in dlm_unlock_lock_handler()
473 if (res->owner != dlm->node_num) { in dlm_unlock_lock_handler()
514 status = dlmunlock_master(dlm, res, lock, lksb, flags, &ignore); in dlm_unlock_lock_handler()
521 dlm_lockres_calc_usage(dlm, res); in dlm_unlock_lock_handler()
522 dlm_kick_thread(dlm, res); in dlm_unlock_lock_handler()
537 dlm_put(dlm); in dlm_unlock_lock_handler()
543 static enum dlm_status dlm_get_cancel_actions(struct dlm_ctxt *dlm, in dlm_get_cancel_actions() argument
575 static enum dlm_status dlm_get_unlock_actions(struct dlm_ctxt *dlm, in dlm_get_unlock_actions() argument
602 enum dlm_status dlmunlock(struct dlm_ctxt *dlm, struct dlm_lockstatus *lksb, in dlmunlock() argument
643 is_master = (res->owner == dlm->node_num); in dlmunlock()
649 status = dlmunlock_master(dlm, res, lock, lksb, flags, in dlmunlock()
654 status = dlmunlock_remote(dlm, res, lock, lksb, flags, in dlmunlock()
689 dlm_kick_thread(dlm, NULL); in dlmunlock()
690 wait_event(dlm->ast_wq, in dlmunlock()
691 dlm_lock_basts_flushed(dlm, lock)); in dlmunlock()
701 dlm_kick_thread(dlm, res); in dlmunlock()
705 dlm_lockres_calc_usage(dlm, res); in dlmunlock()