1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* -*- mode: c; c-basic-offset: 8; -*-
3 * vim: noexpandtab sw=8 ts=8 sts=0:
5 * Copyright (C) 2004, 2005 Oracle. All rights reserved.
8 #include <linux/slab.h>
9 #include <linux/kernel.h>
10 #include <linux/module.h>
11 #include <linux/configfs.h>
14 #include "nodemanager.h"
15 #include "heartbeat.h"
19 /* for now we operate under the assertion that there can be only one
20 * cluster active at a time. Changing this will require trickling
21 * cluster references throughout where nodes are looked up */
22 struct o2nm_cluster
*o2nm_single_cluster
= NULL
;
24 static const char *o2nm_fence_method_desc
[O2NM_FENCE_METHODS
] = {
25 "reset", /* O2NM_FENCE_RESET */
26 "panic", /* O2NM_FENCE_PANIC */
29 static inline void o2nm_lock_subsystem(void);
30 static inline void o2nm_unlock_subsystem(void);
32 struct o2nm_node
*o2nm_get_node_by_num(u8 node_num
)
34 struct o2nm_node
*node
= NULL
;
36 if (node_num
>= O2NM_MAX_NODES
|| o2nm_single_cluster
== NULL
)
39 read_lock(&o2nm_single_cluster
->cl_nodes_lock
);
40 node
= o2nm_single_cluster
->cl_nodes
[node_num
];
42 config_item_get(&node
->nd_item
);
43 read_unlock(&o2nm_single_cluster
->cl_nodes_lock
);
47 EXPORT_SYMBOL_GPL(o2nm_get_node_by_num
);
49 int o2nm_configured_node_map(unsigned long *map
, unsigned bytes
)
51 struct o2nm_cluster
*cluster
= o2nm_single_cluster
;
53 BUG_ON(bytes
< (sizeof(cluster
->cl_nodes_bitmap
)));
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
);
64 EXPORT_SYMBOL_GPL(o2nm_configured_node_map
);
66 static struct o2nm_node
*o2nm_node_ip_tree_lookup(struct o2nm_cluster
*cluster
,
68 struct rb_node
***ret_p
,
69 struct rb_node
**ret_parent
)
71 struct rb_node
**p
= &cluster
->cl_node_ip_tree
.rb_node
;
72 struct rb_node
*parent
= NULL
;
73 struct o2nm_node
*node
, *ret
= NULL
;
79 node
= rb_entry(parent
, struct o2nm_node
, nd_ip_node
);
81 cmp
= memcmp(&ip_needle
, &node
->nd_ipv4_address
,
95 if (ret_parent
!= NULL
)
101 struct o2nm_node
*o2nm_get_node_by_ip(__be32 addr
)
103 struct o2nm_node
*node
= NULL
;
104 struct o2nm_cluster
*cluster
= o2nm_single_cluster
;
109 read_lock(&cluster
->cl_nodes_lock
);
110 node
= o2nm_node_ip_tree_lookup(cluster
, addr
, NULL
, NULL
);
112 config_item_get(&node
->nd_item
);
113 read_unlock(&cluster
->cl_nodes_lock
);
118 EXPORT_SYMBOL_GPL(o2nm_get_node_by_ip
);
120 void o2nm_node_put(struct o2nm_node
*node
)
122 config_item_put(&node
->nd_item
);
124 EXPORT_SYMBOL_GPL(o2nm_node_put
);
126 void o2nm_node_get(struct o2nm_node
*node
)
128 config_item_get(&node
->nd_item
);
130 EXPORT_SYMBOL_GPL(o2nm_node_get
);
132 u8
o2nm_this_node(void)
134 u8 node_num
= O2NM_MAX_NODES
;
136 if (o2nm_single_cluster
&& o2nm_single_cluster
->cl_has_local
)
137 node_num
= o2nm_single_cluster
->cl_local_node
;
141 EXPORT_SYMBOL_GPL(o2nm_this_node
);
143 /* node configfs bits */
145 static struct o2nm_cluster
*to_o2nm_cluster(struct config_item
*item
)
148 container_of(to_config_group(item
), struct o2nm_cluster
,
153 static struct o2nm_node
*to_o2nm_node(struct config_item
*item
)
155 return item
? container_of(item
, struct o2nm_node
, nd_item
) : NULL
;
158 static void o2nm_node_release(struct config_item
*item
)
160 struct o2nm_node
*node
= to_o2nm_node(item
);
164 static ssize_t
o2nm_node_num_show(struct config_item
*item
, char *page
)
166 return sprintf(page
, "%d\n", to_o2nm_node(item
)->nd_num
);
169 static struct o2nm_cluster
*to_o2nm_cluster_from_node(struct o2nm_node
*node
)
171 /* through the first node_set .parent
172 * mycluster/nodes/mynode == o2nm_cluster->o2nm_node_group->o2nm_node */
173 if (node
->nd_item
.ci_parent
)
174 return to_o2nm_cluster(node
->nd_item
.ci_parent
->ci_parent
);
180 O2NM_NODE_ATTR_NUM
= 0,
182 O2NM_NODE_ATTR_ADDRESS
,
185 static ssize_t
o2nm_node_num_store(struct config_item
*item
, const char *page
,
188 struct o2nm_node
*node
= to_o2nm_node(item
);
189 struct o2nm_cluster
*cluster
;
191 char *p
= (char *)page
;
194 tmp
= simple_strtoul(p
, &p
, 0);
195 if (!p
|| (*p
&& (*p
!= '\n')))
198 if (tmp
>= O2NM_MAX_NODES
)
201 /* once we're in the cl_nodes tree networking can look us up by
202 * node number and try to use our address and port attributes
203 * to connect to this node.. make sure that they've been set
204 * before writing the node attribute? */
205 if (!test_bit(O2NM_NODE_ATTR_ADDRESS
, &node
->nd_set_attributes
) ||
206 !test_bit(O2NM_NODE_ATTR_PORT
, &node
->nd_set_attributes
))
207 return -EINVAL
; /* XXX */
209 o2nm_lock_subsystem();
210 cluster
= to_o2nm_cluster_from_node(node
);
212 o2nm_unlock_subsystem();
216 write_lock(&cluster
->cl_nodes_lock
);
217 if (cluster
->cl_nodes
[tmp
])
219 else if (test_and_set_bit(O2NM_NODE_ATTR_NUM
,
220 &node
->nd_set_attributes
))
223 cluster
->cl_nodes
[tmp
] = node
;
225 set_bit(tmp
, cluster
->cl_nodes_bitmap
);
227 write_unlock(&cluster
->cl_nodes_lock
);
228 o2nm_unlock_subsystem();
235 static ssize_t
o2nm_node_ipv4_port_show(struct config_item
*item
, char *page
)
237 return sprintf(page
, "%u\n", ntohs(to_o2nm_node(item
)->nd_ipv4_port
));
240 static ssize_t
o2nm_node_ipv4_port_store(struct config_item
*item
,
241 const char *page
, size_t count
)
243 struct o2nm_node
*node
= to_o2nm_node(item
);
245 char *p
= (char *)page
;
247 tmp
= simple_strtoul(p
, &p
, 0);
248 if (!p
|| (*p
&& (*p
!= '\n')))
256 if (test_and_set_bit(O2NM_NODE_ATTR_PORT
, &node
->nd_set_attributes
))
258 node
->nd_ipv4_port
= htons(tmp
);
263 static ssize_t
o2nm_node_ipv4_address_show(struct config_item
*item
, char *page
)
265 return sprintf(page
, "%pI4\n", &to_o2nm_node(item
)->nd_ipv4_address
);
268 static ssize_t
o2nm_node_ipv4_address_store(struct config_item
*item
,
272 struct o2nm_node
*node
= to_o2nm_node(item
);
273 struct o2nm_cluster
*cluster
;
275 struct rb_node
**p
, *parent
;
276 unsigned int octets
[4];
277 __be32 ipv4_addr
= 0;
279 ret
= sscanf(page
, "%3u.%3u.%3u.%3u", &octets
[3], &octets
[2],
280 &octets
[1], &octets
[0]);
284 for (i
= 0; i
< ARRAY_SIZE(octets
); i
++) {
287 be32_add_cpu(&ipv4_addr
, octets
[i
] << (i
* 8));
290 o2nm_lock_subsystem();
291 cluster
= to_o2nm_cluster_from_node(node
);
293 o2nm_unlock_subsystem();
298 write_lock(&cluster
->cl_nodes_lock
);
299 if (o2nm_node_ip_tree_lookup(cluster
, ipv4_addr
, &p
, &parent
))
301 else if (test_and_set_bit(O2NM_NODE_ATTR_ADDRESS
,
302 &node
->nd_set_attributes
))
305 rb_link_node(&node
->nd_ip_node
, parent
, p
);
306 rb_insert_color(&node
->nd_ip_node
, &cluster
->cl_node_ip_tree
);
308 write_unlock(&cluster
->cl_nodes_lock
);
309 o2nm_unlock_subsystem();
314 memcpy(&node
->nd_ipv4_address
, &ipv4_addr
, sizeof(ipv4_addr
));
319 static ssize_t
o2nm_node_local_show(struct config_item
*item
, char *page
)
321 return sprintf(page
, "%d\n", to_o2nm_node(item
)->nd_local
);
324 static ssize_t
o2nm_node_local_store(struct config_item
*item
, const char *page
,
327 struct o2nm_node
*node
= to_o2nm_node(item
);
328 struct o2nm_cluster
*cluster
;
330 char *p
= (char *)page
;
333 tmp
= simple_strtoul(p
, &p
, 0);
334 if (!p
|| (*p
&& (*p
!= '\n')))
337 tmp
= !!tmp
; /* boolean of whether this node wants to be local */
339 /* setting local turns on networking rx for now so we require having
340 * set everything else first */
341 if (!test_bit(O2NM_NODE_ATTR_ADDRESS
, &node
->nd_set_attributes
) ||
342 !test_bit(O2NM_NODE_ATTR_NUM
, &node
->nd_set_attributes
) ||
343 !test_bit(O2NM_NODE_ATTR_PORT
, &node
->nd_set_attributes
))
344 return -EINVAL
; /* XXX */
346 o2nm_lock_subsystem();
347 cluster
= to_o2nm_cluster_from_node(node
);
353 /* the only failure case is trying to set a new local node
354 * when a different one is already set */
355 if (tmp
&& tmp
== cluster
->cl_has_local
&&
356 cluster
->cl_local_node
!= node
->nd_num
) {
361 /* bring up the rx thread if we're setting the new local node. */
362 if (tmp
&& !cluster
->cl_has_local
) {
363 ret
= o2net_start_listening(node
);
368 if (!tmp
&& cluster
->cl_has_local
&&
369 cluster
->cl_local_node
== node
->nd_num
) {
370 o2net_stop_listening(node
);
371 cluster
->cl_local_node
= O2NM_INVALID_NODE_NUM
;
374 node
->nd_local
= tmp
;
375 if (node
->nd_local
) {
376 cluster
->cl_has_local
= tmp
;
377 cluster
->cl_local_node
= node
->nd_num
;
383 o2nm_unlock_subsystem();
387 CONFIGFS_ATTR(o2nm_node_
, num
);
388 CONFIGFS_ATTR(o2nm_node_
, ipv4_port
);
389 CONFIGFS_ATTR(o2nm_node_
, ipv4_address
);
390 CONFIGFS_ATTR(o2nm_node_
, local
);
392 static struct configfs_attribute
*o2nm_node_attrs
[] = {
394 &o2nm_node_attr_ipv4_port
,
395 &o2nm_node_attr_ipv4_address
,
396 &o2nm_node_attr_local
,
400 static struct configfs_item_operations o2nm_node_item_ops
= {
401 .release
= o2nm_node_release
,
404 static const struct config_item_type o2nm_node_type
= {
405 .ct_item_ops
= &o2nm_node_item_ops
,
406 .ct_attrs
= o2nm_node_attrs
,
407 .ct_owner
= THIS_MODULE
,
412 struct o2nm_node_group
{
413 struct config_group ns_group
;
418 static struct o2nm_node_group
*to_o2nm_node_group(struct config_group
*group
)
421 container_of(group
, struct o2nm_node_group
, ns_group
)
426 static ssize_t
o2nm_cluster_attr_write(const char *page
, ssize_t count
,
430 char *p
= (char *)page
;
432 tmp
= simple_strtoul(p
, &p
, 0);
433 if (!p
|| (*p
&& (*p
!= '\n')))
446 static ssize_t
o2nm_cluster_idle_timeout_ms_show(struct config_item
*item
,
449 return sprintf(page
, "%u\n", to_o2nm_cluster(item
)->cl_idle_timeout_ms
);
452 static ssize_t
o2nm_cluster_idle_timeout_ms_store(struct config_item
*item
,
453 const char *page
, size_t count
)
455 struct o2nm_cluster
*cluster
= to_o2nm_cluster(item
);
459 ret
= o2nm_cluster_attr_write(page
, count
, &val
);
462 if (cluster
->cl_idle_timeout_ms
!= val
463 && o2net_num_connected_peers()) {
465 "o2net: cannot change idle timeout after "
466 "the first peer has agreed to it."
467 " %d connected peers\n",
468 o2net_num_connected_peers());
470 } else if (val
<= cluster
->cl_keepalive_delay_ms
) {
471 mlog(ML_NOTICE
, "o2net: idle timeout must be larger "
472 "than keepalive delay\n");
475 cluster
->cl_idle_timeout_ms
= val
;
482 static ssize_t
o2nm_cluster_keepalive_delay_ms_show(
483 struct config_item
*item
, char *page
)
485 return sprintf(page
, "%u\n",
486 to_o2nm_cluster(item
)->cl_keepalive_delay_ms
);
489 static ssize_t
o2nm_cluster_keepalive_delay_ms_store(
490 struct config_item
*item
, const char *page
, size_t count
)
492 struct o2nm_cluster
*cluster
= to_o2nm_cluster(item
);
496 ret
= o2nm_cluster_attr_write(page
, count
, &val
);
499 if (cluster
->cl_keepalive_delay_ms
!= val
500 && o2net_num_connected_peers()) {
502 "o2net: cannot change keepalive delay after"
503 " the first peer has agreed to it."
504 " %d connected peers\n",
505 o2net_num_connected_peers());
507 } else if (val
>= cluster
->cl_idle_timeout_ms
) {
508 mlog(ML_NOTICE
, "o2net: keepalive delay must be "
509 "smaller than idle timeout\n");
512 cluster
->cl_keepalive_delay_ms
= val
;
519 static ssize_t
o2nm_cluster_reconnect_delay_ms_show(
520 struct config_item
*item
, char *page
)
522 return sprintf(page
, "%u\n",
523 to_o2nm_cluster(item
)->cl_reconnect_delay_ms
);
526 static ssize_t
o2nm_cluster_reconnect_delay_ms_store(
527 struct config_item
*item
, const char *page
, size_t count
)
529 return o2nm_cluster_attr_write(page
, count
,
530 &to_o2nm_cluster(item
)->cl_reconnect_delay_ms
);
533 static ssize_t
o2nm_cluster_fence_method_show(
534 struct config_item
*item
, char *page
)
536 struct o2nm_cluster
*cluster
= to_o2nm_cluster(item
);
540 ret
= sprintf(page
, "%s\n",
541 o2nm_fence_method_desc
[cluster
->cl_fence_method
]);
545 static ssize_t
o2nm_cluster_fence_method_store(
546 struct config_item
*item
, const char *page
, size_t count
)
550 if (page
[count
- 1] != '\n')
553 for (i
= 0; i
< O2NM_FENCE_METHODS
; ++i
) {
554 if (count
!= strlen(o2nm_fence_method_desc
[i
]) + 1)
556 if (strncasecmp(page
, o2nm_fence_method_desc
[i
], count
- 1))
558 if (to_o2nm_cluster(item
)->cl_fence_method
!= i
) {
559 printk(KERN_INFO
"ocfs2: Changing fence method to %s\n",
560 o2nm_fence_method_desc
[i
]);
561 to_o2nm_cluster(item
)->cl_fence_method
= i
;
570 CONFIGFS_ATTR(o2nm_cluster_
, idle_timeout_ms
);
571 CONFIGFS_ATTR(o2nm_cluster_
, keepalive_delay_ms
);
572 CONFIGFS_ATTR(o2nm_cluster_
, reconnect_delay_ms
);
573 CONFIGFS_ATTR(o2nm_cluster_
, fence_method
);
575 static struct configfs_attribute
*o2nm_cluster_attrs
[] = {
576 &o2nm_cluster_attr_idle_timeout_ms
,
577 &o2nm_cluster_attr_keepalive_delay_ms
,
578 &o2nm_cluster_attr_reconnect_delay_ms
,
579 &o2nm_cluster_attr_fence_method
,
583 static struct config_item
*o2nm_node_group_make_item(struct config_group
*group
,
586 struct o2nm_node
*node
= NULL
;
588 if (strlen(name
) > O2NM_MAX_NAME_LEN
)
589 return ERR_PTR(-ENAMETOOLONG
);
591 node
= kzalloc(sizeof(struct o2nm_node
), GFP_KERNEL
);
593 return ERR_PTR(-ENOMEM
);
595 strcpy(node
->nd_name
, name
); /* use item.ci_namebuf instead? */
596 config_item_init_type_name(&node
->nd_item
, name
, &o2nm_node_type
);
597 spin_lock_init(&node
->nd_lock
);
599 mlog(ML_CLUSTER
, "o2nm: Registering node %s\n", name
);
601 return &node
->nd_item
;
604 static void o2nm_node_group_drop_item(struct config_group
*group
,
605 struct config_item
*item
)
607 struct o2nm_node
*node
= to_o2nm_node(item
);
608 struct o2nm_cluster
*cluster
= to_o2nm_cluster(group
->cg_item
.ci_parent
);
610 if (cluster
->cl_nodes
[node
->nd_num
] == node
) {
611 o2net_disconnect_node(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
;
617 o2net_stop_listening(node
);
621 /* XXX call into net to stop this node from trading messages */
623 write_lock(&cluster
->cl_nodes_lock
);
626 if (node
->nd_ipv4_address
)
627 rb_erase(&node
->nd_ip_node
, &cluster
->cl_node_ip_tree
);
629 /* nd_num might be 0 if the node number hasn't been set.. */
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
);
636 mlog(ML_CLUSTER
, "o2nm: Unregistered node %s\n",
637 config_item_name(&node
->nd_item
));
639 config_item_put(item
);
642 static struct configfs_group_operations o2nm_node_group_group_ops
= {
643 .make_item
= o2nm_node_group_make_item
,
644 .drop_item
= o2nm_node_group_drop_item
,
647 static const struct config_item_type o2nm_node_group_type
= {
648 .ct_group_ops
= &o2nm_node_group_group_ops
,
649 .ct_owner
= THIS_MODULE
,
654 static void o2nm_cluster_release(struct config_item
*item
)
656 struct o2nm_cluster
*cluster
= to_o2nm_cluster(item
);
661 static struct configfs_item_operations o2nm_cluster_item_ops
= {
662 .release
= o2nm_cluster_release
,
665 static const struct config_item_type o2nm_cluster_type
= {
666 .ct_item_ops
= &o2nm_cluster_item_ops
,
667 .ct_attrs
= o2nm_cluster_attrs
,
668 .ct_owner
= THIS_MODULE
,
673 struct o2nm_cluster_group
{
674 struct configfs_subsystem cs_subsys
;
679 static struct o2nm_cluster_group
*to_o2nm_cluster_group(struct config_group
*group
)
682 container_of(to_configfs_subsystem(group
), struct o2nm_cluster_group
, cs_subsys
)
687 static struct config_group
*o2nm_cluster_group_make_group(struct config_group
*group
,
690 struct o2nm_cluster
*cluster
= NULL
;
691 struct o2nm_node_group
*ns
= NULL
;
692 struct config_group
*o2hb_group
= NULL
, *ret
= NULL
;
694 /* this runs under the parent dir's i_mutex; there can be only
695 * one caller in here at a time */
696 if (o2nm_single_cluster
)
697 return ERR_PTR(-ENOSPC
);
699 cluster
= kzalloc(sizeof(struct o2nm_cluster
), GFP_KERNEL
);
700 ns
= kzalloc(sizeof(struct o2nm_node_group
), GFP_KERNEL
);
701 o2hb_group
= o2hb_alloc_hb_set();
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
);
709 config_group_init_type_name(&ns
->ns_group
, "node",
710 &o2nm_node_group_type
);
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
;
727 o2hb_free_hb_set(o2hb_group
);
728 ret
= ERR_PTR(-ENOMEM
);
734 static void o2nm_cluster_group_drop_item(struct config_group
*group
, struct config_item
*item
)
736 struct o2nm_cluster
*cluster
= to_o2nm_cluster(item
);
738 BUG_ON(o2nm_single_cluster
!= cluster
);
739 o2nm_single_cluster
= NULL
;
741 configfs_remove_default_groups(&cluster
->cl_group
);
742 config_item_put(item
);
745 static struct configfs_group_operations o2nm_cluster_group_group_ops
= {
746 .make_group
= o2nm_cluster_group_make_group
,
747 .drop_item
= o2nm_cluster_group_drop_item
,
750 static const struct config_item_type o2nm_cluster_group_type
= {
751 .ct_group_ops
= &o2nm_cluster_group_group_ops
,
752 .ct_owner
= THIS_MODULE
,
755 static struct o2nm_cluster_group o2nm_cluster_group
= {
759 .ci_namebuf
= "cluster",
760 .ci_type
= &o2nm_cluster_group_type
,
766 static inline void o2nm_lock_subsystem(void)
768 mutex_lock(&o2nm_cluster_group
.cs_subsys
.su_mutex
);
771 static inline void o2nm_unlock_subsystem(void)
773 mutex_unlock(&o2nm_cluster_group
.cs_subsys
.su_mutex
);
776 int o2nm_depend_item(struct config_item
*item
)
778 return configfs_depend_item(&o2nm_cluster_group
.cs_subsys
, item
);
781 void o2nm_undepend_item(struct config_item
*item
)
783 configfs_undepend_item(item
);
786 int o2nm_depend_this_node(void)
789 struct o2nm_node
*local_node
;
791 local_node
= o2nm_get_node_by_num(o2nm_this_node());
797 ret
= o2nm_depend_item(&local_node
->nd_item
);
798 o2nm_node_put(local_node
);
804 void o2nm_undepend_this_node(void)
806 struct o2nm_node
*local_node
;
808 local_node
= o2nm_get_node_by_num(o2nm_this_node());
811 o2nm_undepend_item(&local_node
->nd_item
);
812 o2nm_node_put(local_node
);
816 static void __exit
exit_o2nm(void)
818 /* XXX sync with hb callbacks and shut down hb? */
819 o2net_unregister_hb_callbacks();
820 configfs_unregister_subsystem(&o2nm_cluster_group
.cs_subsys
);
827 static int __init
init_o2nm(void)
837 ret
= o2net_register_hb_callbacks();
841 config_group_init(&o2nm_cluster_group
.cs_subsys
.su_group
);
842 mutex_init(&o2nm_cluster_group
.cs_subsys
.su_mutex
);
843 ret
= configfs_register_subsystem(&o2nm_cluster_group
.cs_subsys
);
845 printk(KERN_ERR
"nodemanager: Registration returned %d\n", ret
);
849 ret
= o2cb_sys_init();
853 configfs_unregister_subsystem(&o2nm_cluster_group
.cs_subsys
);
855 o2net_unregister_hb_callbacks();
864 MODULE_AUTHOR("Oracle");
865 MODULE_LICENSE("GPL");
866 MODULE_DESCRIPTION("OCFS2 cluster management");
868 module_init(init_o2nm
)
869 module_exit(exit_o2nm
)