Lines Matching defs:dlm

43 static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm,
101 static enum dlm_status dlmlock_master(struct dlm_ctxt *dlm,
115 lock->ml.node != dlm->node_num) {
143 "node %u for reco lock\n", dlm->name,
154 "node %u for reco lock\n", dlm->name,
170 dlm_queue_ast(dlm, lock);
172 dlm_lockres_release_ast(dlm, res);
174 dlm_lockres_calc_usage(dlm, res);
176 dlm_kick_thread(dlm, res);
197 static enum dlm_status dlmlock_remote(struct dlm_ctxt *dlm,
214 if (res->owner == dlm->node_num) {
228 status = dlm_send_remote_lock_request(dlm, res, lock, flags);
242 dlm->name, res->owner);
263 dlm->name, dlm->node_num, res->owner);
269 dlm_lockres_calc_usage(dlm, res);
283 static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm,
292 create.node_idx = dlm->node_num;
299 tmpret = o2net_send_message(DLM_CREATE_LOCK_MSG, dlm->key, &create,
306 "currently.\n", dlm->name, create.namelen,
313 "node %u\n", dlm->name, create.namelen, create.name,
443 struct dlm_ctxt *dlm = data;
452 BUG_ON(!dlm);
454 if (!dlm_grab(dlm))
460 if (!dlm_domain_fully_joined(dlm)) {
463 dlm->name, create->node_idx, namelen, name);
491 res = dlm_lookup_lockres(dlm, name, namelen);
508 status = dlmlock_master(dlm, res, newlock, be32_to_cpu(create->flags));
517 dlm_put(dlm);
540 enum dlm_status dlmlock(struct dlm_ctxt *dlm, int mode,
617 dlm_wait_for_recovery(dlm);
619 if (res->owner == dlm->node_num)
620 status = dlmconvert_master(dlm, res, lock, flags, mode);
622 status = dlmconvert_remote(dlm, res, lock, flags, mode);
650 dlm_get_next_cookie(dlm->node_num, &tmpcookie);
651 lock = dlm_new_lock(mode, dlm->node_num, tmpcookie, lksb);
658 dlm_wait_for_recovery(dlm);
661 res = dlm_get_lock_resource(dlm, name, namelen, flags);
690 if (res->owner == dlm->node_num)
691 status = dlmlock_master(dlm, res, lock, flags);
693 status = dlmlock_remote(dlm, res, lock, flags);
704 dlm_wait_for_node_death(dlm, res->owner,
707 dlm_wait_for_recovery(dlm);
714 dlm_lockres_drop_inflight_ref(dlm, res);
717 dlm_lockres_calc_usage(dlm, res);
718 dlm_kick_thread(dlm, res);