Lines Matching defs:lkb

52 static void print_format1_lock(struct seq_file *s, struct dlm_lkb *lkb,
55 seq_printf(s, "%08x %s", lkb->lkb_id, print_lockmode(lkb->lkb_grmode));
57 if (lkb->lkb_status == DLM_LKSTS_CONVERT ||
58 lkb->lkb_status == DLM_LKSTS_WAITING)
59 seq_printf(s, " (%s)", print_lockmode(lkb->lkb_rqmode));
61 if (lkb->lkb_nodeid) {
62 if (lkb->lkb_nodeid != res->res_nodeid)
63 seq_printf(s, " Remote: %3d %08x", lkb->lkb_nodeid,
64 lkb->lkb_remid);
66 seq_printf(s, " Master: %08x", lkb->lkb_remid);
69 if (lkb->lkb_wait_type)
70 seq_printf(s, " wait_type: %d", lkb->lkb_wait_type);
77 struct dlm_lkb *lkb;
131 list_for_each_entry(lkb, &res->res_grantqueue, lkb_statequeue) {
132 print_format1_lock(s, lkb, res);
138 list_for_each_entry(lkb, &res->res_convertqueue, lkb_statequeue) {
139 print_format1_lock(s, lkb, res);
145 list_for_each_entry(lkb, &res->res_waitqueue, lkb_statequeue) {
146 print_format1_lock(s, lkb, res);
155 list_for_each_entry(lkb, &res->res_lookup, lkb_rsb_lookup) {
157 lkb->lkb_id, print_lockmode(lkb->lkb_rqmode));
158 if (lkb->lkb_wait_type)
159 seq_printf(s, " wait_type: %d", lkb->lkb_wait_type);
168 static void print_format2_lock(struct seq_file *s, struct dlm_lkb *lkb,
174 if (test_bit(DLM_DFL_USER_BIT, &lkb->lkb_dflags)) {
175 if (lkb->lkb_ua)
176 xid = lkb->lkb_ua->xid;
179 /* microseconds since lkb was added to current queue */
180 us = ktime_to_us(ktime_sub(ktime_get(), lkb->lkb_timestamp));
186 lkb->lkb_id,
187 lkb->lkb_nodeid,
188 lkb->lkb_remid,
189 lkb->lkb_ownpid,
191 lkb->lkb_exflags,
192 dlm_iflags_val(lkb),
193 lkb->lkb_status,
194 lkb->lkb_grmode,
195 lkb->lkb_rqmode,
204 struct dlm_lkb *lkb;
208 list_for_each_entry(lkb, &r->res_grantqueue, lkb_statequeue) {
209 print_format2_lock(s, lkb, r);
214 list_for_each_entry(lkb, &r->res_convertqueue, lkb_statequeue) {
215 print_format2_lock(s, lkb, r);
220 list_for_each_entry(lkb, &r->res_waitqueue, lkb_statequeue) {
221 print_format2_lock(s, lkb, r);
229 static void print_format3_lock(struct seq_file *s, struct dlm_lkb *lkb,
234 if (test_bit(DLM_DFL_USER_BIT, &lkb->lkb_dflags)) {
235 if (lkb->lkb_ua)
236 xid = lkb->lkb_ua->xid;
239 seq_printf(s, "lkb %x %d %x %u %llu %x %x %d %d %d %d %d %d %u %llu %llu\n",
240 lkb->lkb_id,
241 lkb->lkb_nodeid,
242 lkb->lkb_remid,
243 lkb->lkb_ownpid,
245 lkb->lkb_exflags,
246 dlm_iflags_val(lkb),
247 lkb->lkb_status,
248 lkb->lkb_grmode,
249 lkb->lkb_rqmode,
250 lkb->lkb_last_bast_mode,
252 lkb->lkb_wait_type,
253 lkb->lkb_lvbseq,
254 (unsigned long long)ktime_to_ns(lkb->lkb_timestamp),
255 (unsigned long long)ktime_to_ns(lkb->lkb_last_bast_time));
260 struct dlm_lkb *lkb;
307 list_for_each_entry(lkb, &r->res_grantqueue, lkb_statequeue) {
308 print_format3_lock(s, lkb, 0);
313 list_for_each_entry(lkb, &r->res_convertqueue, lkb_statequeue) {
314 print_format3_lock(s, lkb, 0);
319 list_for_each_entry(lkb, &r->res_waitqueue, lkb_statequeue) {
320 print_format3_lock(s, lkb, 0);
325 list_for_each_entry(lkb, &r->res_lookup, lkb_rsb_lookup) {
326 print_format3_lock(s, lkb, 1);
369 static void print_format5_lock(struct seq_file *s, struct dlm_lkb *lkb)
375 spin_lock(&lkb->lkb_cb_lock);
376 list_for_each_entry(cb, &lkb->lkb_callbacks, list) {
378 lkb->lkb_id,
379 dlm_iflags_val(lkb),
385 spin_unlock(&lkb->lkb_cb_lock);
390 struct dlm_lkb *lkb;
394 list_for_each_entry(lkb, &r->res_grantqueue, lkb_statequeue) {
395 print_format5_lock(s, lkb);
400 list_for_each_entry(lkb, &r->res_convertqueue, lkb_statequeue) {
401 print_format5_lock(s, lkb);
406 list_for_each_entry(lkb, &r->res_waitqueue, lkb_statequeue) {
407 print_format5_lock(s, lkb);
816 * dump lkb's on the ls_waiters list
822 struct dlm_lkb *lkb;
829 list_for_each_entry(lkb, &ls->ls_waiters, lkb_wait_reply) {
831 lkb->lkb_id, lkb->lkb_wait_type,
832 lkb->lkb_nodeid, lkb->lkb_resource->res_name);