ocfs2/hb: Expose the list of heartbeating nodes via debugfs
[pandora-kernel.git] / fs / ocfs2 / cluster / nodemanager.c
index 816a3f6..7ee6188 100644 (file)
@@ -250,7 +250,7 @@ static ssize_t o2nm_node_ipv4_port_write(struct o2nm_node *node,
 
 static ssize_t o2nm_node_ipv4_address_read(struct o2nm_node *node, char *page)
 {
-       return sprintf(page, "%u.%u.%u.%u\n", NIPQUAD(node->nd_ipv4_address));
+       return sprintf(page, "%pI4\n", &node->nd_ipv4_address);
 }
 
 static ssize_t o2nm_node_ipv4_address_write(struct o2nm_node *node,
@@ -881,6 +881,7 @@ static void __exit exit_o2nm(void)
        o2cb_sys_shutdown();
 
        o2net_exit();
+       o2hb_exit();
 }
 
 static int __init init_o2nm(void)
@@ -889,11 +890,13 @@ static int __init init_o2nm(void)
 
        cluster_print_version();
 
-       o2hb_init();
+       ret = o2hb_init();
+       if (ret)
+               goto out;
 
        ret = o2net_init();
        if (ret)
-               goto out;
+               goto out_o2hb;
 
        ret = o2net_register_hb_callbacks();
        if (ret)
@@ -916,6 +919,8 @@ out_callbacks:
        o2net_unregister_hb_callbacks();
 out_o2net:
        o2net_exit();
+out_o2hb:
+       o2hb_exit();
 out:
        return ret;
 }