Lines Matching defs:dlm

45 static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm,
103 static enum dlm_status dlmlock_master(struct dlm_ctxt *dlm,
117 lock->ml.node != dlm->node_num) {
145 "node %u for reco lock\n", dlm->name,
156 "node %u for reco lock\n", dlm->name,
172 dlm_queue_ast(dlm, lock);
174 dlm_lockres_release_ast(dlm, res);
176 dlm_lockres_calc_usage(dlm, res);
178 dlm_kick_thread(dlm, res);
199 static enum dlm_status dlmlock_remote(struct dlm_ctxt *dlm,
216 if (res->owner == dlm->node_num) {
230 status = dlm_send_remote_lock_request(dlm, res, lock, flags);
244 dlm->name, res->owner);
265 dlm->name, dlm->node_num, res->owner);
271 dlm_lockres_calc_usage(dlm, res);
285 static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm,
294 create.node_idx = dlm->node_num;
301 tmpret = o2net_send_message(DLM_CREATE_LOCK_MSG, dlm->key, &create,
308 "currently.\n", dlm->name, create.namelen,
315 "node %u\n", dlm->name, create.namelen, create.name,
445 struct dlm_ctxt *dlm = data;
454 BUG_ON(!dlm);
456 if (!dlm_grab(dlm))
462 if (!dlm_domain_fully_joined(dlm)) {
465 dlm->name, create->node_idx, namelen, name);
493 res = dlm_lookup_lockres(dlm, name, namelen);
510 status = dlmlock_master(dlm, res, newlock, be32_to_cpu(create->flags));
519 dlm_put(dlm);
542 enum dlm_status dlmlock(struct dlm_ctxt *dlm, int mode,
619 dlm_wait_for_recovery(dlm);
621 if (res->owner == dlm->node_num)
622 status = dlmconvert_master(dlm, res, lock, flags, mode);
624 status = dlmconvert_remote(dlm, res, lock, flags, mode);
652 dlm_get_next_cookie(dlm->node_num, &tmpcookie);
653 lock = dlm_new_lock(mode, dlm->node_num, tmpcookie, lksb);
660 dlm_wait_for_recovery(dlm);
663 res = dlm_get_lock_resource(dlm, name, namelen, flags);
692 if (res->owner == dlm->node_num)
693 status = dlmlock_master(dlm, res, lock, flags);
695 status = dlmlock_remote(dlm, res, lock, flags);
706 dlm_wait_for_node_death(dlm, res->owner,
709 dlm_wait_for_recovery(dlm);
716 dlm_lockres_drop_inflight_ref(dlm, res);
719 dlm_lockres_calc_usage(dlm, res);
720 dlm_kick_thread(dlm, res);