Lines Matching refs:dlm

41 static enum dlm_status dlm_get_cancel_actions(struct dlm_ctxt *dlm,
46 static enum dlm_status dlm_get_unlock_actions(struct dlm_ctxt *dlm,
52 static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm,
81 static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm, in dlmunlock_common() argument
98 BUG_ON(res->owner != dlm->node_num); in dlmunlock_common()
100 BUG_ON(res->owner == dlm->node_num); in dlmunlock_common()
102 spin_lock(&dlm->ast_lock); in dlmunlock_common()
106 spin_unlock(&dlm->ast_lock); in dlmunlock_common()
140 status = dlm_get_cancel_actions(dlm, res, lock, lksb, &actions); in dlmunlock_common()
142 status = dlm_get_unlock_actions(dlm, res, lock, lksb, &actions); in dlmunlock_common()
166 status = dlm_send_remote_unlock_request(dlm, res, lock, lksb, in dlmunlock_common()
185 dlm->name, res->lockname.len, in dlmunlock_common()
281 static inline enum dlm_status dlmunlock_master(struct dlm_ctxt *dlm, in dlmunlock_master() argument
288 return dlmunlock_common(dlm, res, lock, lksb, flags, call_ast, 1); in dlmunlock_master()
291 static inline enum dlm_status dlmunlock_remote(struct dlm_ctxt *dlm, in dlmunlock_remote() argument
297 return dlmunlock_common(dlm, res, lock, lksb, flags, call_ast, 0); in dlmunlock_remote()
307 static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm, in dlm_send_remote_unlock_request() argument
323 if (owner == dlm->node_num) { in dlm_send_remote_unlock_request()
328 "migration, re-evaluate now\n", dlm->name, in dlm_send_remote_unlock_request()
334 unlock.node_idx = dlm->node_num; in dlm_send_remote_unlock_request()
350 tmpret = o2net_send_message_vec(DLM_UNLOCK_LOCK_MSG, dlm->key, in dlm_send_remote_unlock_request()
359 "node %u\n", tmpret, DLM_UNLOCK_LOCK_MSG, dlm->key, owner); in dlm_send_remote_unlock_request()
368 if (dlm_is_node_dead(dlm, owner)) in dlm_send_remote_unlock_request()
392 struct dlm_ctxt *dlm = data; in dlm_unlock_lock_handler() local
421 if (!dlm_grab(dlm)) in dlm_unlock_lock_handler()
424 mlog_bug_on_msg(!dlm_domain_fully_joined(dlm), in dlm_unlock_lock_handler()
425 "Domain %s not fully joined!\n", dlm->name); in dlm_unlock_lock_handler()
429 res = dlm_lookup_lockres(dlm, unlock->name, unlock->namelen); in dlm_unlock_lock_handler()
455 if (res->owner != dlm->node_num) { in dlm_unlock_lock_handler()
496 status = dlmunlock_master(dlm, res, lock, lksb, flags, &ignore); in dlm_unlock_lock_handler()
503 dlm_lockres_calc_usage(dlm, res); in dlm_unlock_lock_handler()
504 dlm_kick_thread(dlm, res); in dlm_unlock_lock_handler()
519 dlm_put(dlm); in dlm_unlock_lock_handler()
525 static enum dlm_status dlm_get_cancel_actions(struct dlm_ctxt *dlm, in dlm_get_cancel_actions() argument
557 static enum dlm_status dlm_get_unlock_actions(struct dlm_ctxt *dlm, in dlm_get_unlock_actions() argument
584 enum dlm_status dlmunlock(struct dlm_ctxt *dlm, struct dlm_lockstatus *lksb, in dlmunlock() argument
625 is_master = (res->owner == dlm->node_num); in dlmunlock()
631 status = dlmunlock_master(dlm, res, lock, lksb, flags, in dlmunlock()
636 status = dlmunlock_remote(dlm, res, lock, lksb, flags, in dlmunlock()
671 dlm_kick_thread(dlm, NULL); in dlmunlock()
672 wait_event(dlm->ast_wq, in dlmunlock()
673 dlm_lock_basts_flushed(dlm, lock)); in dlmunlock()
683 dlm_kick_thread(dlm, res); in dlmunlock()
687 dlm_lockres_calc_usage(dlm, res); in dlmunlock()