Lines Matching defs:cluster

18  * cluster active at a time.  Changing this will require trickling
19 * cluster references throughout where nodes are looked up */
49 struct o2nm_cluster *cluster = o2nm_single_cluster;
51 BUG_ON(bytes < (sizeof(cluster->cl_nodes_bitmap)));
53 if (cluster == NULL)
56 read_lock(&cluster->cl_nodes_lock);
57 bitmap_copy(map, cluster->cl_nodes_bitmap, O2NM_MAX_NODES);
58 read_unlock(&cluster->cl_nodes_lock);
64 static struct o2nm_node *o2nm_node_ip_tree_lookup(struct o2nm_cluster *cluster,
69 struct rb_node **p = &cluster->cl_node_ip_tree.rb_node;
102 struct o2nm_cluster *cluster = o2nm_single_cluster;
104 if (cluster == NULL)
107 read_lock(&cluster->cl_nodes_lock);
108 node = o2nm_node_ip_tree_lookup(cluster, addr, NULL, NULL);
111 read_unlock(&cluster->cl_nodes_lock);
187 struct o2nm_cluster *cluster;
208 cluster = to_o2nm_cluster_from_node(node);
209 if (!cluster) {
214 write_lock(&cluster->cl_nodes_lock);
215 if (cluster->cl_nodes[tmp])
221 cluster->cl_nodes[tmp] = node;
223 set_bit(tmp, cluster->cl_nodes_bitmap);
225 write_unlock(&cluster->cl_nodes_lock);
271 struct o2nm_cluster *cluster;
289 cluster = to_o2nm_cluster_from_node(node);
290 if (!cluster) {
296 write_lock(&cluster->cl_nodes_lock);
297 if (o2nm_node_ip_tree_lookup(cluster, ipv4_addr, &p, &parent))
304 rb_insert_color(&node->nd_ip_node, &cluster->cl_node_ip_tree);
306 write_unlock(&cluster->cl_nodes_lock);
326 struct o2nm_cluster *cluster;
345 cluster = to_o2nm_cluster_from_node(node);
346 if (!cluster) {
353 if (tmp && tmp == cluster->cl_has_local &&
354 cluster->cl_local_node != node->nd_num) {
360 if (tmp && !cluster->cl_has_local) {
366 if (!tmp && cluster->cl_has_local &&
367 cluster->cl_local_node == node->nd_num) {
369 cluster->cl_local_node = O2NM_INVALID_NODE_NUM;
374 cluster->cl_has_local = tmp;
375 cluster->cl_local_node = node->nd_num;
453 struct o2nm_cluster *cluster = to_o2nm_cluster(item);
460 if (cluster->cl_idle_timeout_ms != val
468 } else if (val <= cluster->cl_keepalive_delay_ms) {
473 cluster->cl_idle_timeout_ms = val;
490 struct o2nm_cluster *cluster = to_o2nm_cluster(item);
497 if (cluster->cl_keepalive_delay_ms != val
505 } else if (val >= cluster->cl_idle_timeout_ms) {
510 cluster->cl_keepalive_delay_ms = val;
534 struct o2nm_cluster *cluster = to_o2nm_cluster(item);
537 if (cluster)
539 o2nm_fence_method_desc[cluster->cl_fence_method]);
606 struct o2nm_cluster *cluster = to_o2nm_cluster(group->cg_item.ci_parent);
608 if (cluster->cl_nodes[node->nd_num] == node) {
611 if (cluster->cl_has_local &&
612 (cluster->cl_local_node == node->nd_num)) {
613 cluster->cl_has_local = 0;
614 cluster->cl_local_node = O2NM_INVALID_NODE_NUM;
621 write_lock(&cluster->cl_nodes_lock);
625 rb_erase(&node->nd_ip_node, &cluster->cl_node_ip_tree);
628 if (cluster->cl_nodes[node->nd_num] == node) {
629 cluster->cl_nodes[node->nd_num] = NULL;
630 clear_bit(node->nd_num, cluster->cl_nodes_bitmap);
632 write_unlock(&cluster->cl_nodes_lock);
650 /* cluster */
654 struct o2nm_cluster *cluster = to_o2nm_cluster(item);
656 kfree(cluster);
669 /* cluster set */
688 struct o2nm_cluster *cluster = NULL;
697 cluster = kzalloc(sizeof(struct o2nm_cluster), GFP_KERNEL);
700 if (cluster == NULL || ns == NULL || o2hb_group == NULL)
703 config_group_init_type_name(&cluster->cl_group, name,
705 configfs_add_default_group(&ns->ns_group, &cluster->cl_group);
709 configfs_add_default_group(o2hb_group, &cluster->cl_group);
711 rwlock_init(&cluster->cl_nodes_lock);
712 cluster->cl_node_ip_tree = RB_ROOT;
713 cluster->cl_reconnect_delay_ms = O2NET_RECONNECT_DELAY_MS_DEFAULT;
714 cluster->cl_idle_timeout_ms = O2NET_IDLE_TIMEOUT_MS_DEFAULT;
715 cluster->cl_keepalive_delay_ms = O2NET_KEEPALIVE_DELAY_MS_DEFAULT;
716 cluster->cl_fence_method = O2NM_FENCE_RESET;
718 ret = &cluster->cl_group;
719 o2nm_single_cluster = cluster;
723 kfree(cluster);
734 struct o2nm_cluster *cluster = to_o2nm_cluster(item);
736 BUG_ON(o2nm_single_cluster != cluster);
739 configfs_remove_default_groups(&cluster->cl_group);
757 .ci_namebuf = "cluster",
864 MODULE_DESCRIPTION("OCFS2 cluster management");