Lines Matching refs:res
53 static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
116 struct dlm_lock_resource *res = lock->lockres; in __dlm_queue_ast() local
118 dlm->name, res->lockname.len, res->lockname.name); in __dlm_queue_ast()
131 dlm_lockres_release_ast(dlm, res); in __dlm_queue_ast()
183 static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, in dlm_update_lvb() argument
190 if (res->owner == dlm->node_num) { in dlm_update_lvb()
192 spin_lock(&res->spinlock); in dlm_update_lvb()
198 memcpy(lksb->lvb, res->lvb, DLM_LVB_LEN); in dlm_update_lvb()
207 spin_unlock(&res->spinlock); in dlm_update_lvb()
214 void dlm_do_local_ast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, in dlm_do_local_ast() argument
226 dlm_update_lvb(dlm, res, lock); in dlm_do_local_ast()
231 int dlm_do_remote_ast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, in dlm_do_remote_ast() argument
244 dlm_update_lvb(dlm, res, lock); in dlm_do_remote_ast()
248 ret = dlm_send_proxy_ast(dlm, res, lock, lksbflags); in dlm_do_remote_ast()
252 void dlm_do_local_bast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, in dlm_do_local_bast() argument
271 struct dlm_lock_resource *res = NULL; in dlm_proxy_ast_handler() local
325 res = dlm_lookup_lockres(dlm, name, locklen); in dlm_proxy_ast_handler()
326 if (!res) { in dlm_proxy_ast_handler()
337 BUG_ON(res->owner == dlm->node_num); in dlm_proxy_ast_handler()
339 mlog(0, "lockres %.*s\n", res->lockname.len, res->lockname.name); in dlm_proxy_ast_handler()
341 spin_lock(&res->spinlock); in dlm_proxy_ast_handler()
342 if (res->state & DLM_LOCK_RES_RECOVERING) { in dlm_proxy_ast_handler()
347 if (res->state & DLM_LOCK_RES_MIGRATING) { in dlm_proxy_ast_handler()
353 head = &res->converting; in dlm_proxy_ast_handler()
363 head = &res->blocked; in dlm_proxy_ast_handler()
365 head = &res->granted; in dlm_proxy_ast_handler()
381 spin_unlock(&res->spinlock); in dlm_proxy_ast_handler()
388 list_move_tail(&lock->list, &res->granted); in dlm_proxy_ast_handler()
406 spin_unlock(&res->spinlock); in dlm_proxy_ast_handler()
409 dlm_do_local_ast(dlm, res, lock); in dlm_proxy_ast_handler()
411 dlm_do_local_bast(dlm, res, lock, past->blocked_type); in dlm_proxy_ast_handler()
414 if (res) in dlm_proxy_ast_handler()
415 dlm_lockres_put(res); in dlm_proxy_ast_handler()
423 int dlm_send_proxy_ast_msg(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, in dlm_send_proxy_ast_msg() argument
434 res->lockname.len, res->lockname.name, lock->ml.node, in dlm_send_proxy_ast_msg()
441 past.namelen = res->lockname.len; in dlm_send_proxy_ast_msg()
442 memcpy(past.name, res->lockname.name, past.namelen); in dlm_send_proxy_ast_msg()