Home
last modified time | relevance | path

Searched refs:lkb (Results 1 – 13 of 13) sorted by relevance

/fs/dlm/
Dlock.c78 static int send_request(struct dlm_rsb *r, struct dlm_lkb *lkb);
79 static int send_convert(struct dlm_rsb *r, struct dlm_lkb *lkb);
80 static int send_unlock(struct dlm_rsb *r, struct dlm_lkb *lkb);
81 static int send_cancel(struct dlm_rsb *r, struct dlm_lkb *lkb);
82 static int send_grant(struct dlm_rsb *r, struct dlm_lkb *lkb);
83 static int send_bast(struct dlm_rsb *r, struct dlm_lkb *lkb, int mode);
84 static int send_lookup(struct dlm_rsb *r, struct dlm_lkb *lkb);
86 static int _request_lock(struct dlm_rsb *r, struct dlm_lkb *lkb);
87 static int _cancel_lock(struct dlm_rsb *r, struct dlm_lkb *lkb);
88 static void __receive_convert_reply(struct dlm_rsb *r, struct dlm_lkb *lkb,
[all …]
Dast.c40 int dlm_enqueue_lkb_callback(struct dlm_lkb *lkb, uint32_t flags, int mode, in dlm_enqueue_lkb_callback() argument
43 struct dlm_ls *ls = lkb->lkb_resource->res_ls; in dlm_enqueue_lkb_callback()
53 if (lkb->lkb_last_cast) { in dlm_enqueue_lkb_callback()
54 if (dlm_modes_compat(mode, lkb->lkb_last_cast->mode)) { in dlm_enqueue_lkb_callback()
56 lkb->lkb_id, mode, in dlm_enqueue_lkb_callback()
57 lkb->lkb_last_cast->mode); in dlm_enqueue_lkb_callback()
68 if (lkb->lkb_last_cb && lkb->lkb_last_cb->flags & DLM_CB_BAST) { in dlm_enqueue_lkb_callback()
69 prev_mode = lkb->lkb_last_cb->mode; in dlm_enqueue_lkb_callback()
74 lkb->lkb_id, mode, prev_mode); in dlm_enqueue_lkb_callback()
79 if (test_bit(DLM_DFL_USER_BIT, &lkb->lkb_dflags)) { in dlm_enqueue_lkb_callback()
[all …]
Ddebug_fs.c52 static void print_format1_lock(struct seq_file *s, struct dlm_lkb *lkb, in print_format1_lock() argument
55 seq_printf(s, "%08x %s", lkb->lkb_id, print_lockmode(lkb->lkb_grmode)); in print_format1_lock()
57 if (lkb->lkb_status == DLM_LKSTS_CONVERT || in print_format1_lock()
58 lkb->lkb_status == DLM_LKSTS_WAITING) in print_format1_lock()
59 seq_printf(s, " (%s)", print_lockmode(lkb->lkb_rqmode)); in print_format1_lock()
61 if (lkb->lkb_nodeid) { in print_format1_lock()
62 if (lkb->lkb_nodeid != res->res_nodeid) in print_format1_lock()
63 seq_printf(s, " Remote: %3d %08x", lkb->lkb_nodeid, in print_format1_lock()
64 lkb->lkb_remid); in print_format1_lock()
66 seq_printf(s, " Master: %08x", lkb->lkb_remid); in print_format1_lock()
[all …]
Duser.c148 void dlm_purge_lkb_callbacks(struct dlm_lkb *lkb) in dlm_purge_lkb_callbacks() argument
152 list_for_each_entry_safe(cb, safe, &lkb->lkb_callbacks, list) { in dlm_purge_lkb_callbacks()
157 clear_bit(DLM_IFL_CB_PENDING_BIT, &lkb->lkb_iflags); in dlm_purge_lkb_callbacks()
160 dlm_callback_set_last_ptr(&lkb->lkb_last_cast, NULL); in dlm_purge_lkb_callbacks()
161 dlm_callback_set_last_ptr(&lkb->lkb_last_cb, NULL); in dlm_purge_lkb_callbacks()
162 lkb->lkb_last_bast_mode = -1; in dlm_purge_lkb_callbacks()
195 void dlm_user_add_ast(struct dlm_lkb *lkb, uint32_t flags, int mode, in dlm_user_add_ast() argument
203 if (test_bit(DLM_DFL_ORPHAN_BIT, &lkb->lkb_dflags) || in dlm_user_add_ast()
204 test_bit(DLM_IFL_DEAD_BIT, &lkb->lkb_iflags)) in dlm_user_add_ast()
207 ls = lkb->lkb_resource->res_ls; in dlm_user_add_ast()
[all …]
Dmemory.c40 goto lkb; in dlm_memory_init()
65 lkb: in dlm_memory_init()
113 struct dlm_lkb *lkb; in dlm_allocate_lkb() local
115 lkb = kmem_cache_zalloc(lkb_cache, GFP_NOFS); in dlm_allocate_lkb()
116 return lkb; in dlm_allocate_lkb()
119 void dlm_free_lkb(struct dlm_lkb *lkb) in dlm_free_lkb() argument
121 if (test_bit(DLM_DFL_USER_BIT, &lkb->lkb_dflags)) { in dlm_free_lkb()
123 ua = lkb->lkb_ua; in dlm_free_lkb()
131 dlm_callback_set_last_ptr(&lkb->lkb_last_cast, NULL); in dlm_free_lkb()
132 dlm_callback_set_last_ptr(&lkb->lkb_last_cb, NULL); in dlm_free_lkb()
[all …]
Drecover.c404 struct dlm_lkb *lkb; in set_lock_master() local
406 list_for_each_entry(lkb, queue, lkb_statequeue) { in set_lock_master()
407 if (!test_bit(DLM_IFL_MSTCPY_BIT, &lkb->lkb_iflags)) { in set_lock_master()
408 lkb->lkb_nodeid = nodeid; in set_lock_master()
409 lkb->lkb_remid = 0; in set_lock_master()
621 struct dlm_lkb *lkb; in recover_locks_queue() local
624 list_for_each_entry(lkb, head, lkb_statequeue) { in recover_locks_queue()
625 error = dlm_send_rcom_lock(r, lkb, seq); in recover_locks_queue()
823 struct dlm_lkb *lkb; in recover_conversion() local
826 list_for_each_entry(lkb, &r->res_grantqueue, lkb_statequeue) { in recover_conversion()
[all …]
Drcom.c418 static void pack_rcom_lock(struct dlm_rsb *r, struct dlm_lkb *lkb, in pack_rcom_lock() argument
423 rl->rl_ownpid = cpu_to_le32(lkb->lkb_ownpid); in pack_rcom_lock()
424 rl->rl_lkid = cpu_to_le32(lkb->lkb_id); in pack_rcom_lock()
425 rl->rl_exflags = cpu_to_le32(lkb->lkb_exflags); in pack_rcom_lock()
426 rl->rl_flags = cpu_to_le32(dlm_dflags_val(lkb)); in pack_rcom_lock()
427 rl->rl_lvbseq = cpu_to_le32(lkb->lkb_lvbseq); in pack_rcom_lock()
428 rl->rl_rqmode = lkb->lkb_rqmode; in pack_rcom_lock()
429 rl->rl_grmode = lkb->lkb_grmode; in pack_rcom_lock()
430 rl->rl_status = lkb->lkb_status; in pack_rcom_lock()
431 rl->rl_wait_type = cpu_to_le16(lkb->lkb_wait_type); in pack_rcom_lock()
[all …]
Ddlm_internal.h753 static inline uint32_t dlm_iflags_val(const struct dlm_lkb *lkb) in dlm_iflags_val() argument
755 return dlm_flags_val(&lkb->lkb_iflags, __DLM_IFL_MIN_BIT, in dlm_iflags_val()
759 static inline uint32_t dlm_dflags_val(const struct dlm_lkb *lkb) in dlm_dflags_val() argument
761 return dlm_flags_val(&lkb->lkb_dflags, __DLM_DFL_MIN_BIT, in dlm_dflags_val()
776 static inline uint32_t dlm_sbflags_val(const struct dlm_lkb *lkb) in dlm_sbflags_val() argument
781 return dlm_flags_val(&lkb->lkb_sbflags, __DLM_SBF_MIN_BIT, in dlm_sbflags_val()
798 static inline void dlm_set_dflags_val(struct dlm_lkb *lkb, uint32_t val) in dlm_set_dflags_val() argument
800 dlm_set_flags_val(&lkb->lkb_dflags, val, __DLM_DFL_MIN_BIT, in dlm_set_dflags_val()
804 static inline void dlm_set_sbflags_val(struct dlm_lkb *lkb, uint32_t val) in dlm_set_sbflags_val() argument
806 dlm_set_flags_val(&lkb->lkb_sbflags, val, __DLM_SBF_MIN_BIT, in dlm_set_sbflags_val()
Dast.h17 int dlm_enqueue_lkb_callback(struct dlm_lkb *lkb, uint32_t flags, int mode,
22 int dlm_dequeue_lkb_callback(struct dlm_lkb *lkb, struct dlm_callback **cb);
23 void dlm_add_cb(struct dlm_lkb *lkb, uint32_t flags, int mode, int status,
Duser.h9 void dlm_purge_lkb_callbacks(struct dlm_lkb *lkb);
10 void dlm_user_add_ast(struct dlm_lkb *lkb, uint32_t flags, int mode,
Dlockspace.c730 struct dlm_lkb *lkb = p; in lkb_idr_is_local() local
732 return lkb->lkb_nodeid == 0 && lkb->lkb_grmode != DLM_LOCK_IV; in lkb_idr_is_local()
742 struct dlm_lkb *lkb = p; in lkb_idr_free() local
744 if (lkb->lkb_lvbptr && test_bit(DLM_IFL_MSTCPY_BIT, &lkb->lkb_iflags)) in lkb_idr_free()
745 dlm_free_lvb(lkb->lkb_lvbptr); in lkb_idr_free()
747 dlm_free_lkb(lkb); in lkb_idr_free()
Dlock.h16 void dlm_print_lkb(struct dlm_lkb *lkb);
23 int dlm_put_lkb(struct dlm_lkb *lkb);
Drcom.h20 int dlm_send_rcom_lock(struct dlm_rsb *r, struct dlm_lkb *lkb, uint64_t seq);