Lines Matching refs:rc
35 struct dlm_rcom *rc; in create_rcom() local
48 rc = (struct dlm_rcom *) mb; in create_rcom()
50 rc->rc_header.h_version = (DLM_HEADER_MAJOR | DLM_HEADER_MINOR); in create_rcom()
51 rc->rc_header.h_lockspace = ls->ls_global_id; in create_rcom()
52 rc->rc_header.h_nodeid = dlm_our_nodeid(); in create_rcom()
53 rc->rc_header.h_length = mb_len; in create_rcom()
54 rc->rc_header.h_cmd = DLM_RCOM; in create_rcom()
56 rc->rc_type = type; in create_rcom()
59 rc->rc_seq = ls->ls_recover_seq; in create_rcom()
63 *rc_ret = rc; in create_rcom()
68 struct dlm_rcom *rc) in send_rcom() argument
70 dlm_rcom_out(rc); in send_rcom()
95 static int check_rcom_config(struct dlm_ls *ls, struct dlm_rcom *rc, int nodeid) in check_rcom_config() argument
97 struct rcom_config *rf = (struct rcom_config *) rc->rc_buf; in check_rcom_config()
99 if ((rc->rc_header.h_version & 0xFFFF0000) != DLM_HEADER_MAJOR) { in check_rcom_config()
102 rc->rc_header.h_version); in check_rcom_config()
146 struct dlm_rcom *rc; in dlm_rcom_status() local
153 rc = ls->ls_recover_buf; in dlm_rcom_status()
154 rc->rc_result = dlm_recover_status(ls); in dlm_rcom_status()
160 sizeof(struct rcom_status), &rc, &mh); in dlm_rcom_status()
164 set_rcom_status(ls, (struct rcom_status *)rc->rc_buf, status_flags); in dlm_rcom_status()
166 allow_sync_reply(ls, &rc->rc_id); in dlm_rcom_status()
169 send_rcom(ls, mh, rc); in dlm_rcom_status()
178 rc = ls->ls_recover_buf; in dlm_rcom_status()
180 if (rc->rc_result == -ESRCH) { in dlm_rcom_status()
183 rc->rc_result = 0; in dlm_rcom_status()
186 error = check_rcom_config(ls, rc, nodeid); in dlm_rcom_status()
196 struct dlm_rcom *rc; in receive_rcom_status() local
225 len, &rc, &mh); in receive_rcom_status()
229 rc->rc_id = rc_in->rc_id; in receive_rcom_status()
230 rc->rc_seq_reply = rc_in->rc_seq; in receive_rcom_status()
231 rc->rc_result = status; in receive_rcom_status()
233 set_rcom_config(ls, (struct rcom_config *)rc->rc_buf, num_slots); in receive_rcom_status()
243 rc->rc_result = 0; in receive_rcom_status()
244 set_rcom_config(ls, (struct rcom_config *)rc->rc_buf, 0); in receive_rcom_status()
248 dlm_slots_copy_out(ls, rc); in receive_rcom_status()
252 send_rcom(ls, mh, rc); in receive_rcom_status()
276 struct dlm_rcom *rc; in dlm_rcom_names() local
283 error = create_rcom(ls, nodeid, DLM_RCOM_NAMES, last_len, &rc, &mh); in dlm_rcom_names()
286 memcpy(rc->rc_buf, last_name, last_len); in dlm_rcom_names()
288 allow_sync_reply(ls, &rc->rc_id); in dlm_rcom_names()
291 send_rcom(ls, mh, rc); in dlm_rcom_names()
303 struct dlm_rcom *rc; in receive_rcom_names() local
311 error = create_rcom(ls, nodeid, DLM_RCOM_NAMES_REPLY, outlen, &rc, &mh); in receive_rcom_names()
314 rc->rc_id = rc_in->rc_id; in receive_rcom_names()
315 rc->rc_seq_reply = rc_in->rc_seq; in receive_rcom_names()
317 dlm_copy_master_names(ls, rc_in->rc_buf, inlen, rc->rc_buf, outlen, in receive_rcom_names()
319 send_rcom(ls, mh, rc); in receive_rcom_names()
324 struct dlm_rcom *rc; in dlm_send_rcom_lookup() local
330 &rc, &mh); in dlm_send_rcom_lookup()
333 memcpy(rc->rc_buf, r->res_name, r->res_length); in dlm_send_rcom_lookup()
334 rc->rc_id = (unsigned long) r->res_id; in dlm_send_rcom_lookup()
336 send_rcom(ls, mh, rc); in dlm_send_rcom_lookup()
343 struct dlm_rcom *rc; in receive_rcom_lookup() local
348 error = create_rcom(ls, nodeid, DLM_RCOM_LOOKUP_REPLY, 0, &rc, &mh); in receive_rcom_lookup()
363 rc->rc_result = ret_nodeid; in receive_rcom_lookup()
364 rc->rc_id = rc_in->rc_id; in receive_rcom_lookup()
365 rc->rc_seq_reply = rc_in->rc_seq; in receive_rcom_lookup()
367 send_rcom(ls, mh, rc); in receive_rcom_lookup()
408 struct dlm_rcom *rc; in dlm_send_rcom_lock() local
416 error = create_rcom(ls, r->res_nodeid, DLM_RCOM_LOCK, len, &rc, &mh); in dlm_send_rcom_lock()
420 rl = (struct rcom_lock *) rc->rc_buf; in dlm_send_rcom_lock()
422 rc->rc_id = (unsigned long) r; in dlm_send_rcom_lock()
424 send_rcom(ls, mh, rc); in dlm_send_rcom_lock()
432 struct dlm_rcom *rc; in receive_rcom_lock() local
439 sizeof(struct rcom_lock), &rc, &mh); in receive_rcom_lock()
446 memcpy(rc->rc_buf, rc_in->rc_buf, sizeof(struct rcom_lock)); in receive_rcom_lock()
447 rc->rc_id = rc_in->rc_id; in receive_rcom_lock()
448 rc->rc_seq_reply = rc_in->rc_seq; in receive_rcom_lock()
450 send_rcom(ls, mh, rc); in receive_rcom_lock()
458 struct dlm_rcom *rc; in dlm_send_ls_not_ready() local
469 rc = (struct dlm_rcom *) mb; in dlm_send_ls_not_ready()
471 rc->rc_header.h_version = (DLM_HEADER_MAJOR | DLM_HEADER_MINOR); in dlm_send_ls_not_ready()
472 rc->rc_header.h_lockspace = rc_in->rc_header.h_lockspace; in dlm_send_ls_not_ready()
473 rc->rc_header.h_nodeid = dlm_our_nodeid(); in dlm_send_ls_not_ready()
474 rc->rc_header.h_length = mb_len; in dlm_send_ls_not_ready()
475 rc->rc_header.h_cmd = DLM_RCOM; in dlm_send_ls_not_ready()
477 rc->rc_type = DLM_RCOM_STATUS_REPLY; in dlm_send_ls_not_ready()
478 rc->rc_id = rc_in->rc_id; in dlm_send_ls_not_ready()
479 rc->rc_seq_reply = rc_in->rc_seq; in dlm_send_ls_not_ready()
480 rc->rc_result = -ESRCH; in dlm_send_ls_not_ready()
482 rf = (struct rcom_config *) rc->rc_buf; in dlm_send_ls_not_ready()
485 dlm_rcom_out(rc); in dlm_send_ls_not_ready()
536 void dlm_receive_rcom(struct dlm_ls *ls, struct dlm_rcom *rc, int nodeid) in dlm_receive_rcom() argument
543 switch (rc->rc_type) { in dlm_receive_rcom()
576 if (stop && (rc->rc_type != DLM_RCOM_STATUS)) in dlm_receive_rcom()
579 if (reply && (rc->rc_seq_reply != seq)) in dlm_receive_rcom()
588 switch (rc->rc_type) { in dlm_receive_rcom()
590 receive_rcom_status(ls, rc); in dlm_receive_rcom()
594 receive_rcom_names(ls, rc); in dlm_receive_rcom()
598 receive_rcom_lookup(ls, rc); in dlm_receive_rcom()
602 if (rc->rc_header.h_length < lock_size) in dlm_receive_rcom()
604 receive_rcom_lock(ls, rc); in dlm_receive_rcom()
608 receive_sync_reply(ls, rc); in dlm_receive_rcom()
612 receive_sync_reply(ls, rc); in dlm_receive_rcom()
616 receive_rcom_lookup_reply(ls, rc); in dlm_receive_rcom()
620 if (rc->rc_header.h_length < lock_size) in dlm_receive_rcom()
622 dlm_recover_process_copy(ls, rc); in dlm_receive_rcom()
626 log_error(ls, "receive_rcom bad type %d", rc->rc_type); in dlm_receive_rcom()
633 rc->rc_type, in dlm_receive_rcom()
635 (unsigned long long)rc->rc_seq, in dlm_receive_rcom()
636 (unsigned long long)rc->rc_seq_reply, in dlm_receive_rcom()
642 rc->rc_type, nodeid); in dlm_receive_rcom()