/fs/dlm/ |
D | lock.c | 76 static int send_request(struct dlm_rsb *r, struct dlm_lkb *lkb); 77 static int send_convert(struct dlm_rsb *r, struct dlm_lkb *lkb); 78 static int send_unlock(struct dlm_rsb *r, struct dlm_lkb *lkb); 79 static int send_cancel(struct dlm_rsb *r, struct dlm_lkb *lkb); 80 static int send_grant(struct dlm_rsb *r, struct dlm_lkb *lkb); 81 static int send_bast(struct dlm_rsb *r, struct dlm_lkb *lkb, int mode); 82 static int send_lookup(struct dlm_rsb *r, struct dlm_lkb *lkb); 84 static int _request_lock(struct dlm_rsb *r, struct dlm_lkb *lkb); 85 static int _cancel_lock(struct dlm_rsb *r, struct dlm_lkb *lkb); 86 static void __receive_convert_reply(struct dlm_rsb *r, struct dlm_lkb *lkb, [all …]
|
D | debug_fs.c | 50 static int print_format1_lock(struct seq_file *s, struct dlm_lkb *lkb, in print_format1_lock() argument 53 seq_printf(s, "%08x %s", lkb->lkb_id, print_lockmode(lkb->lkb_grmode)); in print_format1_lock() 55 if (lkb->lkb_status == DLM_LKSTS_CONVERT || in print_format1_lock() 56 lkb->lkb_status == DLM_LKSTS_WAITING) in print_format1_lock() 57 seq_printf(s, " (%s)", print_lockmode(lkb->lkb_rqmode)); in print_format1_lock() 59 if (lkb->lkb_nodeid) { in print_format1_lock() 60 if (lkb->lkb_nodeid != res->res_nodeid) in print_format1_lock() 61 seq_printf(s, " Remote: %3d %08x", lkb->lkb_nodeid, in print_format1_lock() 62 lkb->lkb_remid); in print_format1_lock() 64 seq_printf(s, " Master: %08x", lkb->lkb_remid); in print_format1_lock() [all …]
|
D | ast.c | 28 void dlm_del_ast(struct dlm_lkb *lkb) in dlm_del_ast() argument 31 if (lkb->lkb_ast_type & (AST_COMP | AST_BAST)) in dlm_del_ast() 32 list_del(&lkb->lkb_astqueue); in dlm_del_ast() 36 void dlm_add_ast(struct dlm_lkb *lkb, int type, int bastmode) in dlm_add_ast() argument 38 if (lkb->lkb_flags & DLM_IFL_USER) { in dlm_add_ast() 39 dlm_user_add_ast(lkb, type, bastmode); in dlm_add_ast() 44 if (!(lkb->lkb_ast_type & (AST_COMP | AST_BAST))) { in dlm_add_ast() 45 kref_get(&lkb->lkb_ref); in dlm_add_ast() 46 list_add_tail(&lkb->lkb_astqueue, &ast_queue); in dlm_add_ast() 48 lkb->lkb_ast_type |= type; in dlm_add_ast() [all …]
|
D | netlink.c | 104 static void fill_data(struct dlm_lock_data *data, struct dlm_lkb *lkb) in fill_data() argument 106 struct dlm_rsb *r = lkb->lkb_resource; in fill_data() 111 data->nodeid = lkb->lkb_nodeid; in fill_data() 112 data->ownpid = lkb->lkb_ownpid; in fill_data() 113 data->id = lkb->lkb_id; in fill_data() 114 data->remid = lkb->lkb_remid; in fill_data() 115 data->status = lkb->lkb_status; in fill_data() 116 data->grmode = lkb->lkb_grmode; in fill_data() 117 data->rqmode = lkb->lkb_rqmode; in fill_data() 118 if (lkb->lkb_ua) in fill_data() [all …]
|
D | recover.c | 292 struct dlm_lkb *lkb; in set_lock_master() local 294 list_for_each_entry(lkb, queue, lkb_statequeue) in set_lock_master() 295 if (!(lkb->lkb_flags & DLM_IFL_MSTCPY)) in set_lock_master() 296 lkb->lkb_nodeid = nodeid; in set_lock_master() 466 struct dlm_lkb *lkb; in recover_locks_queue() local 469 list_for_each_entry(lkb, head, lkb_statequeue) { in recover_locks_queue() 470 error = dlm_send_rcom_lock(r, lkb); in recover_locks_queue() 580 struct dlm_lkb *lkb, *high_lkb = NULL; in recover_lvb() local 586 list_for_each_entry(lkb, &r->res_grantqueue, lkb_statequeue) { in recover_lvb() 587 if (!(lkb->lkb_exflags & DLM_LKF_VALBLK)) in recover_lvb() [all …]
|
D | user.c | 156 static int lkb_is_endoflife(struct dlm_lkb *lkb, int sb_status, int type) in lkb_is_endoflife() argument 164 if (lkb->lkb_grmode == DLM_LOCK_IV) in lkb_is_endoflife() 168 if (type == AST_COMP && lkb->lkb_grmode == DLM_LOCK_IV) in lkb_is_endoflife() 178 void dlm_user_add_ast(struct dlm_lkb *lkb, int type, int bastmode) in dlm_user_add_ast() argument 185 if (lkb->lkb_flags & (DLM_IFL_ORPHAN | DLM_IFL_DEAD)) in dlm_user_add_ast() 188 ls = lkb->lkb_resource->res_ls; in dlm_user_add_ast() 197 if (lkb->lkb_flags & (DLM_IFL_ORPHAN | DLM_IFL_DEAD)) in dlm_user_add_ast() 200 DLM_ASSERT(lkb->lkb_ua, dlm_print_lkb(lkb);); in dlm_user_add_ast() 201 ua = lkb->lkb_ua; in dlm_user_add_ast() 209 ast_type = lkb->lkb_ast_type; in dlm_user_add_ast() [all …]
|
D | memory.c | 73 struct dlm_lkb *lkb; in dlm_allocate_lkb() local 75 lkb = kmem_cache_zalloc(lkb_cache, ls->ls_allocation); in dlm_allocate_lkb() 76 return lkb; in dlm_allocate_lkb() 79 void dlm_free_lkb(struct dlm_lkb *lkb) in dlm_free_lkb() argument 81 if (lkb->lkb_flags & DLM_IFL_USER) { in dlm_free_lkb() 83 ua = lkb->lkb_ua; in dlm_free_lkb() 90 kmem_cache_free(lkb_cache, lkb); in dlm_free_lkb()
|
D | rcom.c | 308 static void pack_rcom_lock(struct dlm_rsb *r, struct dlm_lkb *lkb, in pack_rcom_lock() argument 313 rl->rl_ownpid = cpu_to_le32(lkb->lkb_ownpid); in pack_rcom_lock() 314 rl->rl_lkid = cpu_to_le32(lkb->lkb_id); in pack_rcom_lock() 315 rl->rl_exflags = cpu_to_le32(lkb->lkb_exflags); in pack_rcom_lock() 316 rl->rl_flags = cpu_to_le32(lkb->lkb_flags); in pack_rcom_lock() 317 rl->rl_lvbseq = cpu_to_le32(lkb->lkb_lvbseq); in pack_rcom_lock() 318 rl->rl_rqmode = lkb->lkb_rqmode; in pack_rcom_lock() 319 rl->rl_grmode = lkb->lkb_grmode; in pack_rcom_lock() 320 rl->rl_status = lkb->lkb_status; in pack_rcom_lock() 321 rl->rl_wait_type = cpu_to_le16(lkb->lkb_wait_type); in pack_rcom_lock() [all …]
|
D | lockspace.c | 644 struct dlm_lkb *lkb; in lockspace_busy() local 655 list_for_each_entry(lkb, &ls->ls_lkbtbl[i].list, in lockspace_busy() 657 if (!lkb->lkb_nodeid) { in lockspace_busy() 670 struct dlm_lkb *lkb; in release_lockspace() local 727 lkb = list_entry(head->next, struct dlm_lkb, in release_lockspace() 730 list_del(&lkb->lkb_idtbl_list); in release_lockspace() 732 dlm_del_ast(lkb); in release_lockspace() 734 if (lkb->lkb_lvbptr && lkb->lkb_flags & DLM_IFL_MSTCPY) in release_lockspace() 735 dlm_free_lvb(lkb->lkb_lvbptr); in release_lockspace() 737 dlm_free_lkb(lkb); in release_lockspace()
|
D | ast.h | 16 void dlm_add_ast(struct dlm_lkb *lkb, int type, int bastmode); 17 void dlm_del_ast(struct dlm_lkb *lkb);
|
D | lock.h | 17 void dlm_print_lkb(struct dlm_lkb *lkb); 23 int dlm_put_lkb(struct dlm_lkb *lkb);
|
D | user.h | 12 void dlm_user_add_ast(struct dlm_lkb *lkb, int type, int bastmode);
|
D | rcom.h | 20 int dlm_send_rcom_lock(struct dlm_rsb *r, struct dlm_lkb *lkb);
|
D | dlm_internal.h | 586 void dlm_timeout_warn(struct dlm_lkb *lkb);
|