Lines Matching defs:res
51 static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
113 struct dlm_lock_resource *res = lock->lockres;
115 dlm->name, res->lockname.len, res->lockname.name);
121 * so res->spinlock will not be taken here */
126 * to get to this point. the res->spinlock will not be
128 dlm_lockres_release_ast(dlm, res);
180 static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
187 spin_lock(&res->spinlock);
188 if (res->owner == dlm->node_num) {
194 memcpy(lksb->lvb, res->lvb, DLM_LVB_LEN);
204 spin_unlock(&res->spinlock);
210 void dlm_do_local_ast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
222 dlm_update_lvb(dlm, res, lock);
227 int dlm_do_remote_ast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
240 dlm_update_lvb(dlm, res, lock);
244 ret = dlm_send_proxy_ast(dlm, res, lock, lksbflags);
248 void dlm_do_local_bast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
267 struct dlm_lock_resource *res = NULL;
321 res = dlm_lookup_lockres(dlm, name, locklen);
322 if (!res) {
333 BUG_ON(res->owner == dlm->node_num);
335 mlog(0, "lockres %.*s\n", res->lockname.len, res->lockname.name);
337 spin_lock(&res->spinlock);
338 if (res->state & DLM_LOCK_RES_RECOVERING) {
343 if (res->state & DLM_LOCK_RES_MIGRATING) {
349 head = &res->converting;
359 head = &res->blocked;
361 head = &res->granted;
377 spin_unlock(&res->spinlock);
384 list_move_tail(&lock->list, &res->granted);
402 spin_unlock(&res->spinlock);
405 dlm_do_local_ast(dlm, res, lock);
407 dlm_do_local_bast(dlm, res, lock, past->blocked_type);
410 if (res)
411 dlm_lockres_put(res);
419 int dlm_send_proxy_ast_msg(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
429 mlog_entry("res %.*s, to=%u, type=%d, blocked_type=%d\n",
430 res->lockname.len, res->lockname.name, lock->ml.node,
437 past.namelen = res->lockname.len;
438 memcpy(past.name, res->lockname.name, past.namelen);