• Home
  • Raw
  • Download

Lines Matching refs:node

34 	struct o2nm_node *node = NULL;  in o2nm_get_node_by_num()  local
40 node = o2nm_single_cluster->cl_nodes[node_num]; in o2nm_get_node_by_num()
41 if (node) in o2nm_get_node_by_num()
42 config_item_get(&node->nd_item); in o2nm_get_node_by_num()
45 return node; in o2nm_get_node_by_num()
73 struct o2nm_node *node, *ret = NULL; in o2nm_node_ip_tree_lookup() local
79 node = rb_entry(parent, struct o2nm_node, nd_ip_node); in o2nm_node_ip_tree_lookup()
81 cmp = memcmp(&ip_needle, &node->nd_ipv4_address, in o2nm_node_ip_tree_lookup()
88 ret = node; in o2nm_node_ip_tree_lookup()
103 struct o2nm_node *node = NULL; in o2nm_get_node_by_ip() local
110 node = o2nm_node_ip_tree_lookup(cluster, addr, NULL, NULL); in o2nm_get_node_by_ip()
111 if (node) in o2nm_get_node_by_ip()
112 config_item_get(&node->nd_item); in o2nm_get_node_by_ip()
116 return node; in o2nm_get_node_by_ip()
120 void o2nm_node_put(struct o2nm_node *node) in o2nm_node_put() argument
122 config_item_put(&node->nd_item); in o2nm_node_put()
126 void o2nm_node_get(struct o2nm_node *node) in o2nm_node_get() argument
128 config_item_get(&node->nd_item); in o2nm_node_get()
160 struct o2nm_node *node = to_o2nm_node(item); in o2nm_node_release() local
161 kfree(node); in o2nm_node_release()
169 static struct o2nm_cluster *to_o2nm_cluster_from_node(struct o2nm_node *node) in to_o2nm_cluster_from_node() argument
173 if (node->nd_item.ci_parent) in to_o2nm_cluster_from_node()
174 return to_o2nm_cluster(node->nd_item.ci_parent->ci_parent); in to_o2nm_cluster_from_node()
188 struct o2nm_node *node = to_o2nm_node(item); in o2nm_node_num_store() local
205 if (!test_bit(O2NM_NODE_ATTR_ADDRESS, &node->nd_set_attributes) || in o2nm_node_num_store()
206 !test_bit(O2NM_NODE_ATTR_PORT, &node->nd_set_attributes)) in o2nm_node_num_store()
210 cluster = to_o2nm_cluster_from_node(node); in o2nm_node_num_store()
220 &node->nd_set_attributes)) in o2nm_node_num_store()
223 cluster->cl_nodes[tmp] = node; in o2nm_node_num_store()
224 node->nd_num = tmp; in o2nm_node_num_store()
243 struct o2nm_node *node = to_o2nm_node(item); in o2nm_node_ipv4_port_store() local
256 if (test_and_set_bit(O2NM_NODE_ATTR_PORT, &node->nd_set_attributes)) in o2nm_node_ipv4_port_store()
258 node->nd_ipv4_port = htons(tmp); in o2nm_node_ipv4_port_store()
272 struct o2nm_node *node = to_o2nm_node(item); in o2nm_node_ipv4_address_store() local
291 cluster = to_o2nm_cluster_from_node(node); in o2nm_node_ipv4_address_store()
302 &node->nd_set_attributes)) in o2nm_node_ipv4_address_store()
305 rb_link_node(&node->nd_ip_node, parent, p); in o2nm_node_ipv4_address_store()
306 rb_insert_color(&node->nd_ip_node, &cluster->cl_node_ip_tree); in o2nm_node_ipv4_address_store()
314 memcpy(&node->nd_ipv4_address, &ipv4_addr, sizeof(ipv4_addr)); in o2nm_node_ipv4_address_store()
327 struct o2nm_node *node = to_o2nm_node(item); in o2nm_node_local_store() local
341 if (!test_bit(O2NM_NODE_ATTR_ADDRESS, &node->nd_set_attributes) || in o2nm_node_local_store()
342 !test_bit(O2NM_NODE_ATTR_NUM, &node->nd_set_attributes) || in o2nm_node_local_store()
343 !test_bit(O2NM_NODE_ATTR_PORT, &node->nd_set_attributes)) in o2nm_node_local_store()
347 cluster = to_o2nm_cluster_from_node(node); in o2nm_node_local_store()
356 cluster->cl_local_node != node->nd_num) { in o2nm_node_local_store()
363 ret = o2net_start_listening(node); in o2nm_node_local_store()
369 cluster->cl_local_node == node->nd_num) { in o2nm_node_local_store()
370 o2net_stop_listening(node); in o2nm_node_local_store()
374 node->nd_local = tmp; in o2nm_node_local_store()
375 if (node->nd_local) { in o2nm_node_local_store()
377 cluster->cl_local_node = node->nd_num; in o2nm_node_local_store()
586 struct o2nm_node *node = NULL; in o2nm_node_group_make_item() local
591 node = kzalloc(sizeof(struct o2nm_node), GFP_KERNEL); in o2nm_node_group_make_item()
592 if (node == NULL) in o2nm_node_group_make_item()
595 strcpy(node->nd_name, name); /* use item.ci_namebuf instead? */ in o2nm_node_group_make_item()
596 config_item_init_type_name(&node->nd_item, name, &o2nm_node_type); in o2nm_node_group_make_item()
597 spin_lock_init(&node->nd_lock); in o2nm_node_group_make_item()
601 return &node->nd_item; in o2nm_node_group_make_item()
607 struct o2nm_node *node = to_o2nm_node(item); in o2nm_node_group_drop_item() local
610 if (cluster->cl_nodes[node->nd_num] == node) { in o2nm_node_group_drop_item()
611 o2net_disconnect_node(node); in o2nm_node_group_drop_item()
614 (cluster->cl_local_node == node->nd_num)) { in o2nm_node_group_drop_item()
617 o2net_stop_listening(node); in o2nm_node_group_drop_item()
626 if (node->nd_ipv4_address) in o2nm_node_group_drop_item()
627 rb_erase(&node->nd_ip_node, &cluster->cl_node_ip_tree); in o2nm_node_group_drop_item()
630 if (cluster->cl_nodes[node->nd_num] == node) { in o2nm_node_group_drop_item()
631 cluster->cl_nodes[node->nd_num] = NULL; in o2nm_node_group_drop_item()
632 clear_bit(node->nd_num, cluster->cl_nodes_bitmap); in o2nm_node_group_drop_item()
637 config_item_name(&node->nd_item)); in o2nm_node_group_drop_item()