Lines Matching refs:dlm
43 static enum dlm_status dlm_get_cancel_actions(struct dlm_ctxt *dlm,
48 static enum dlm_status dlm_get_unlock_actions(struct dlm_ctxt *dlm,
54 static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm,
83 static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm, in dlmunlock_common() argument
100 BUG_ON(res->owner != dlm->node_num); in dlmunlock_common()
102 BUG_ON(res->owner == dlm->node_num); in dlmunlock_common()
104 spin_lock(&dlm->ast_lock); in dlmunlock_common()
108 spin_unlock(&dlm->ast_lock); in dlmunlock_common()
142 status = dlm_get_cancel_actions(dlm, res, lock, lksb, &actions); in dlmunlock_common()
144 status = dlm_get_unlock_actions(dlm, res, lock, lksb, &actions); in dlmunlock_common()
168 status = dlm_send_remote_unlock_request(dlm, res, lock, lksb, in dlmunlock_common()
187 dlm->name, res->lockname.len, in dlmunlock_common()
283 static inline enum dlm_status dlmunlock_master(struct dlm_ctxt *dlm, in dlmunlock_master() argument
290 return dlmunlock_common(dlm, res, lock, lksb, flags, call_ast, 1); in dlmunlock_master()
293 static inline enum dlm_status dlmunlock_remote(struct dlm_ctxt *dlm, in dlmunlock_remote() argument
299 return dlmunlock_common(dlm, res, lock, lksb, flags, call_ast, 0); in dlmunlock_remote()
309 static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm, in dlm_send_remote_unlock_request() argument
325 if (owner == dlm->node_num) { in dlm_send_remote_unlock_request()
330 "migration, re-evaluate now\n", dlm->name, in dlm_send_remote_unlock_request()
336 unlock.node_idx = dlm->node_num; in dlm_send_remote_unlock_request()
352 tmpret = o2net_send_message_vec(DLM_UNLOCK_LOCK_MSG, dlm->key, in dlm_send_remote_unlock_request()
361 "node %u\n", tmpret, DLM_UNLOCK_LOCK_MSG, dlm->key, owner); in dlm_send_remote_unlock_request()
370 if (dlm_is_node_dead(dlm, owner)) in dlm_send_remote_unlock_request()
394 struct dlm_ctxt *dlm = data; in dlm_unlock_lock_handler() local
423 if (!dlm_grab(dlm)) in dlm_unlock_lock_handler()
426 mlog_bug_on_msg(!dlm_domain_fully_joined(dlm), in dlm_unlock_lock_handler()
427 "Domain %s not fully joined!\n", dlm->name); in dlm_unlock_lock_handler()
431 res = dlm_lookup_lockres(dlm, unlock->name, unlock->namelen); in dlm_unlock_lock_handler()
458 if (res->owner != dlm->node_num) { in dlm_unlock_lock_handler()
499 status = dlmunlock_master(dlm, res, lock, lksb, flags, &ignore); in dlm_unlock_lock_handler()
506 dlm_lockres_calc_usage(dlm, res); in dlm_unlock_lock_handler()
507 dlm_kick_thread(dlm, res); in dlm_unlock_lock_handler()
522 dlm_put(dlm); in dlm_unlock_lock_handler()
528 static enum dlm_status dlm_get_cancel_actions(struct dlm_ctxt *dlm, in dlm_get_cancel_actions() argument
560 static enum dlm_status dlm_get_unlock_actions(struct dlm_ctxt *dlm, in dlm_get_unlock_actions() argument
587 enum dlm_status dlmunlock(struct dlm_ctxt *dlm, struct dlm_lockstatus *lksb, in dlmunlock() argument
628 is_master = (res->owner == dlm->node_num); in dlmunlock()
634 status = dlmunlock_master(dlm, res, lock, lksb, flags, in dlmunlock()
639 status = dlmunlock_remote(dlm, res, lock, lksb, flags, in dlmunlock()
674 dlm_kick_thread(dlm, NULL); in dlmunlock()
675 wait_event(dlm->ast_wq, in dlmunlock()
676 dlm_lock_basts_flushed(dlm, lock)); in dlmunlock()
686 dlm_kick_thread(dlm, res); in dlmunlock()
690 dlm_lockres_calc_usage(dlm, res); in dlmunlock()