Lines Matching refs:nodeid

155 	int nodeid;  member
275 static struct midcomms_node *__find_node(int nodeid, int r) in __find_node() argument
280 if (node->nodeid == nodeid) in __find_node()
307 pr_debug("flush midcomms send queue of node %d\n", node->nodeid); in dlm_send_queue_flush()
320 pr_debug("reset node %d\n", node->nodeid); in midcomms_node_reset()
333 static struct midcomms_node *nodeid2node(int nodeid) in nodeid2node() argument
335 return __find_node(nodeid, nodeid_hash(nodeid)); in nodeid2node()
338 int dlm_midcomms_addr(int nodeid, struct sockaddr_storage *addr, int len) in dlm_midcomms_addr() argument
340 int ret, idx, r = nodeid_hash(nodeid); in dlm_midcomms_addr()
343 ret = dlm_lowcomms_addr(nodeid, addr, len); in dlm_midcomms_addr()
348 node = __find_node(nodeid, r); in dlm_midcomms_addr()
359 node->nodeid = nodeid; in dlm_midcomms_addr()
372 node->debugfs = dlm_create_debug_comms_file(nodeid, node); in dlm_midcomms_addr()
376 static int dlm_send_ack(int nodeid, uint32_t seq) in dlm_send_ack() argument
383 msg = dlm_lowcomms_new_msg(nodeid, mb_len, GFP_ATOMIC, &ppc, in dlm_send_ack()
421 dlm_send_ack(node->nodeid, atomic_read(&node->seq_next)); in dlm_send_ack_threshold()
432 mh = dlm_midcomms_get_mhandle(node->nodeid, mb_len, GFP_ATOMIC, &ppc); in dlm_send_fin()
446 pr_debug("sending fin msg to node %d\n", node->nodeid); in dlm_send_fin()
484 node->nodeid, dlm_state_str(node->state)); in dlm_pas_fin_ack_rcv()
541 node->nodeid, dlm_state_str(node->state)); in dlm_midcomms_receive_buffer()
545 dlm_send_ack(node->nodeid, nval); in dlm_midcomms_receive_buffer()
554 node->nodeid, dlm_state_str(node->state)); in dlm_midcomms_receive_buffer()
560 node->nodeid, dlm_state_str(node->state)); in dlm_midcomms_receive_buffer()
564 dlm_send_ack(node->nodeid, nval); in dlm_midcomms_receive_buffer()
568 node->nodeid, dlm_state_str(node->state)); in dlm_midcomms_receive_buffer()
571 dlm_send_ack(node->nodeid, nval); in dlm_midcomms_receive_buffer()
574 node->nodeid, dlm_state_str(node->state)); in dlm_midcomms_receive_buffer()
591 dlm_receive_buffer(p, node->nodeid); in dlm_midcomms_receive_buffer()
602 dlm_send_ack(node->nodeid, oval); in dlm_midcomms_receive_buffer()
605 seq, oval, node->nodeid); in dlm_midcomms_receive_buffer()
610 int nodeid) in dlm_opts_check_msglen() argument
629 len, nodeid); in dlm_opts_check_msglen()
637 msglen, nodeid); in dlm_opts_check_msglen()
645 len, nodeid); in dlm_opts_check_msglen()
652 p->opts.o_nextcmd, nodeid); in dlm_opts_check_msglen()
659 static void dlm_midcomms_receive_buffer_3_2(const union dlm_packet *p, int nodeid) in dlm_midcomms_receive_buffer_3_2() argument
667 node = nodeid2node(nodeid); in dlm_midcomms_receive_buffer_3_2()
676 node->nodeid); in dlm_midcomms_receive_buffer_3_2()
683 node->nodeid, dlm_state_str(node->state)); in dlm_midcomms_receive_buffer_3_2()
695 DLM_VERSION_3_2, node->nodeid, node->version); in dlm_midcomms_receive_buffer_3_2()
718 le32_to_cpu(p->rcom.rc_type), nodeid); in dlm_midcomms_receive_buffer_3_2()
723 dlm_receive_buffer(p, nodeid); in dlm_midcomms_receive_buffer_3_2()
728 ret = dlm_opts_check_msglen(p, msglen, nodeid); in dlm_midcomms_receive_buffer_3_2()
731 msglen, nodeid); in dlm_midcomms_receive_buffer_3_2()
744 msglen, nodeid); in dlm_midcomms_receive_buffer_3_2()
752 msglen, nodeid); in dlm_midcomms_receive_buffer_3_2()
760 msglen, nodeid); in dlm_midcomms_receive_buffer_3_2()
767 msglen, nodeid); in dlm_midcomms_receive_buffer_3_2()
779 p->header.h_cmd, nodeid); in dlm_midcomms_receive_buffer_3_2()
787 static void dlm_midcomms_receive_buffer_3_1(const union dlm_packet *p, int nodeid) in dlm_midcomms_receive_buffer_3_1() argument
794 node = nodeid2node(nodeid); in dlm_midcomms_receive_buffer_3_1()
805 node->nodeid); in dlm_midcomms_receive_buffer_3_1()
811 DLM_VERSION_3_1, node->nodeid, node->version); in dlm_midcomms_receive_buffer_3_1()
824 msglen, nodeid); in dlm_midcomms_receive_buffer_3_1()
831 p->header.h_cmd, nodeid); in dlm_midcomms_receive_buffer_3_1()
835 dlm_receive_buffer(p, nodeid); in dlm_midcomms_receive_buffer_3_1()
838 int dlm_validate_incoming_buffer(int nodeid, unsigned char *buf, int len) in dlm_validate_incoming_buffer() argument
863 msglen, nodeid); in dlm_validate_incoming_buffer()
885 int dlm_process_incoming_buffer(int nodeid, unsigned char *buf, int len) in dlm_process_incoming_buffer() argument
901 dlm_midcomms_receive_buffer_3_1((const union dlm_packet *)ptr, nodeid); in dlm_process_incoming_buffer()
904 dlm_midcomms_receive_buffer_3_2((const union dlm_packet *)ptr, nodeid); in dlm_process_incoming_buffer()
908 le32_to_cpu(hd->h_version), nodeid); in dlm_process_incoming_buffer()
920 void dlm_midcomms_unack_msg_resend(int nodeid) in dlm_midcomms_unack_msg_resend() argument
927 node = nodeid2node(nodeid); in dlm_midcomms_unack_msg_resend()
950 mh->seq, node->nodeid); in dlm_midcomms_unack_msg_resend()
979 static struct dlm_msg *dlm_midcomms_get_msg_3_2(struct dlm_mhandle *mh, int nodeid, in dlm_midcomms_get_msg_3_2() argument
985 msg = dlm_lowcomms_new_msg(nodeid, len + DLM_MIDCOMMS_OPT_LEN, in dlm_midcomms_get_msg_3_2()
1005 struct dlm_mhandle *dlm_midcomms_get_mhandle(int nodeid, int len, in dlm_midcomms_get_mhandle() argument
1014 node = nodeid2node(nodeid); in dlm_midcomms_get_mhandle()
1032 msg = dlm_lowcomms_new_msg(nodeid, len, allocation, ppc, in dlm_midcomms_get_mhandle()
1044 msg = dlm_midcomms_get_msg_3_2(mh, nodeid, len, allocation, in dlm_midcomms_get_mhandle()
1077 trace_dlm_send_message(mh->node->nodeid, mh->seq, in dlm_midcomms_commit_msg_3_2_trace()
1082 trace_dlm_send_rcom(mh->node->nodeid, mh->seq, in dlm_midcomms_commit_msg_3_2_trace()
1192 node->nodeid, dlm_state_str(node->state)); in dlm_act_fin_ack_rcv()
1198 node->nodeid, dlm_state_str(node->state)); in dlm_act_fin_ack_rcv()
1203 node->nodeid, dlm_state_str(node->state)); in dlm_act_fin_ack_rcv()
1219 void dlm_midcomms_add_member(int nodeid) in dlm_midcomms_add_member() argument
1225 node = nodeid2node(nodeid); in dlm_midcomms_add_member()
1234 node->nodeid, dlm_state_str(node->state)); in dlm_midcomms_add_member()
1241 node->nodeid, dlm_state_str(node->state)); in dlm_midcomms_add_member()
1249 node->nodeid); in dlm_midcomms_add_member()
1258 pr_debug("node %d users inc count %d\n", nodeid, node->users); in dlm_midcomms_add_member()
1264 void dlm_midcomms_remove_member(int nodeid) in dlm_midcomms_remove_member() argument
1270 node = nodeid2node(nodeid); in dlm_midcomms_remove_member()
1289 pr_debug("node %d users dec count %d\n", nodeid, node->users); in dlm_midcomms_remove_member()
1297 node->nodeid, dlm_state_str(node->state)); in dlm_midcomms_remove_member()
1305 node->nodeid, dlm_state_str(node->state)); in dlm_midcomms_remove_member()
1341 node->nodeid, dlm_state_str(node->state)); in dlm_midcomms_version_wait()
1361 node->nodeid, dlm_state_str(node->state)); in midcomms_shutdown()
1366 node->nodeid, dlm_state_str(node->state)); in midcomms_shutdown()
1390 node->nodeid, dlm_state_str(node->state)); in midcomms_shutdown()
1393 node->nodeid, dlm_state_str(node->state)); in midcomms_shutdown()
1420 int dlm_midcomms_close(int nodeid) in dlm_midcomms_close() argument
1427 node = nodeid2node(nodeid); in dlm_midcomms_close()
1439 node = nodeid2node(nodeid); in dlm_midcomms_close()
1443 return dlm_lowcomms_close(nodeid); in dlm_midcomms_close()
1446 ret = dlm_lowcomms_close(nodeid); in dlm_midcomms_close()
1505 msg = dlm_lowcomms_new_msg(node->nodeid, buflen, GFP_NOFS, in dlm_midcomms_rawmsg_send()