ocfs2/cluster: Print messages when adding/removing nodes
authorSunil Mushran <sunil.mushran@oracle.com>
Fri, 8 Oct 2010 00:30:17 +0000 (17:30 -0700)
committerSunil Mushran <sunil.mushran@oracle.com>
Fri, 8 Oct 2010 00:30:17 +0000 (17:30 -0700)
Prints messages when the user adds or removes nodes.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
fs/ocfs2/cluster/masklog.h
fs/ocfs2/cluster/nodemanager.c

index fd96e2a2fa56556018d5ebc56ba0bc1a610f7e1e..ea2ed9f56c94ad0654a5f79259e50a1f046bed97 100644 (file)
 #define ML_ERROR       0x0000000100000000ULL /* sent to KERN_ERR */
 #define ML_NOTICE      0x0000000200000000ULL /* setn to KERN_NOTICE */
 #define ML_KTHREAD     0x0000000400000000ULL /* kernel thread activity */
-#define        ML_RESERVATIONS 0x0000000800000000ULL /* ocfs2 alloc reservations */
+#define ML_RESERVATIONS        0x0000000800000000ULL /* ocfs2 alloc reservations */
+#define ML_CLUSTER     0x0000001000000000ULL /* cluster stack */
 
 #define MLOG_INITIAL_AND_MASK (ML_ERROR|ML_NOTICE)
 #define MLOG_INITIAL_NOT_MASK (ML_ENTRY|ML_EXIT)
index ed0c9f367fed03fe0114b6956b6bb4a34ade5b77..bb240647ca5f5e0f47f52c43860ae7d1c3be435a 100644 (file)
@@ -711,6 +711,8 @@ static struct config_item *o2nm_node_group_make_item(struct config_group *group,
        config_item_init_type_name(&node->nd_item, name, &o2nm_node_type);
        spin_lock_init(&node->nd_lock);
 
+       mlog(ML_CLUSTER, "o2nm: Registering node %s\n", name);
+
        return &node->nd_item;
 }
 
@@ -744,6 +746,9 @@ static void o2nm_node_group_drop_item(struct config_group *group,
        }
        write_unlock(&cluster->cl_nodes_lock);
 
+       mlog(ML_CLUSTER, "o2nm: Unregistered node %s\n",
+            config_item_name(&node->nd_item));
+
        config_item_put(item);
 }