Lines Matching defs:cluster

20  * cluster active at a time.  Changing this will require trickling
21 * cluster references throughout where nodes are looked up */
51 struct o2nm_cluster *cluster = o2nm_single_cluster;
53 BUG_ON(bytes < (sizeof(cluster->cl_nodes_bitmap)));
55 if (cluster == NULL)
58 read_lock(&cluster->cl_nodes_lock);
59 memcpy(map, cluster->cl_nodes_bitmap, sizeof(cluster->cl_nodes_bitmap));
60 read_unlock(&cluster->cl_nodes_lock);
66 static struct o2nm_node *o2nm_node_ip_tree_lookup(struct o2nm_cluster *cluster,
71 struct rb_node **p = &cluster->cl_node_ip_tree.rb_node;
104 struct o2nm_cluster *cluster = o2nm_single_cluster;
106 if (cluster == NULL)
109 read_lock(&cluster->cl_nodes_lock);
110 node = o2nm_node_ip_tree_lookup(cluster, addr, NULL, NULL);
113 read_unlock(&cluster->cl_nodes_lock);
189 struct o2nm_cluster *cluster;
210 cluster = to_o2nm_cluster_from_node(node);
211 if (!cluster) {
216 write_lock(&cluster->cl_nodes_lock);
217 if (cluster->cl_nodes[tmp])
223 cluster->cl_nodes[tmp] = node;
225 set_bit(tmp, cluster->cl_nodes_bitmap);
227 write_unlock(&cluster->cl_nodes_lock);
273 struct o2nm_cluster *cluster;
291 cluster = to_o2nm_cluster_from_node(node);
292 if (!cluster) {
298 write_lock(&cluster->cl_nodes_lock);
299 if (o2nm_node_ip_tree_lookup(cluster, ipv4_addr, &p, &parent))
306 rb_insert_color(&node->nd_ip_node, &cluster->cl_node_ip_tree);
308 write_unlock(&cluster->cl_nodes_lock);
328 struct o2nm_cluster *cluster;
347 cluster = to_o2nm_cluster_from_node(node);
348 if (!cluster) {
355 if (tmp && tmp == cluster->cl_has_local &&
356 cluster->cl_local_node != node->nd_num) {
362 if (tmp && !cluster->cl_has_local) {
368 if (!tmp && cluster->cl_has_local &&
369 cluster->cl_local_node == node->nd_num) {
371 cluster->cl_local_node = O2NM_INVALID_NODE_NUM;
376 cluster->cl_has_local = tmp;
377 cluster->cl_local_node = node->nd_num;
455 struct o2nm_cluster *cluster = to_o2nm_cluster(item);
462 if (cluster->cl_idle_timeout_ms != val
470 } else if (val <= cluster->cl_keepalive_delay_ms) {
475 cluster->cl_idle_timeout_ms = val;
492 struct o2nm_cluster *cluster = to_o2nm_cluster(item);
499 if (cluster->cl_keepalive_delay_ms != val
507 } else if (val >= cluster->cl_idle_timeout_ms) {
512 cluster->cl_keepalive_delay_ms = val;
536 struct o2nm_cluster *cluster = to_o2nm_cluster(item);
539 if (cluster)
541 o2nm_fence_method_desc[cluster->cl_fence_method]);
608 struct o2nm_cluster *cluster = to_o2nm_cluster(group->cg_item.ci_parent);
610 if (cluster->cl_nodes[node->nd_num] == node) {
613 if (cluster->cl_has_local &&
614 (cluster->cl_local_node == node->nd_num)) {
615 cluster->cl_has_local = 0;
616 cluster->cl_local_node = O2NM_INVALID_NODE_NUM;
623 write_lock(&cluster->cl_nodes_lock);
627 rb_erase(&node->nd_ip_node, &cluster->cl_node_ip_tree);
630 if (cluster->cl_nodes[node->nd_num] == node) {
631 cluster->cl_nodes[node->nd_num] = NULL;
632 clear_bit(node->nd_num, cluster->cl_nodes_bitmap);
634 write_unlock(&cluster->cl_nodes_lock);
652 /* cluster */
656 struct o2nm_cluster *cluster = to_o2nm_cluster(item);
658 kfree(cluster);
671 /* cluster set */
690 struct o2nm_cluster *cluster = NULL;
699 cluster = kzalloc(sizeof(struct o2nm_cluster), GFP_KERNEL);
702 if (cluster == NULL || ns == NULL || o2hb_group == NULL)
705 config_group_init_type_name(&cluster->cl_group, name,
707 configfs_add_default_group(&ns->ns_group, &cluster->cl_group);
711 configfs_add_default_group(o2hb_group, &cluster->cl_group);
713 rwlock_init(&cluster->cl_nodes_lock);
714 cluster->cl_node_ip_tree = RB_ROOT;
715 cluster->cl_reconnect_delay_ms = O2NET_RECONNECT_DELAY_MS_DEFAULT;
716 cluster->cl_idle_timeout_ms = O2NET_IDLE_TIMEOUT_MS_DEFAULT;
717 cluster->cl_keepalive_delay_ms = O2NET_KEEPALIVE_DELAY_MS_DEFAULT;
718 cluster->cl_fence_method = O2NM_FENCE_RESET;
720 ret = &cluster->cl_group;
721 o2nm_single_cluster = cluster;
725 kfree(cluster);
736 struct o2nm_cluster *cluster = to_o2nm_cluster(item);
738 BUG_ON(o2nm_single_cluster != cluster);
741 configfs_remove_default_groups(&cluster->cl_group);
759 .ci_namebuf = "cluster",
866 MODULE_DESCRIPTION("OCFS2 cluster management");