======================================
Fix missing build dependency for scripts subdir in Makefile.
Extend lv_info() for more efficient lv_is_active_locally() check.
+ Fix node up/down handling in clvmd corosync module.
Version 2.02.101 - 20th September 2013
======================================
struct node_info
{
- enum {NODE_UNKNOWN, NODE_DOWN, NODE_UP, NODE_CLVMD} state;
+ enum {NODE_DOWN, NODE_CLVMD} state;
int nodeid;
};
ninfo->state = NODE_DOWN;
}
- for (i=0; i<member_list_entries; i++) {
- if (member_list[i].nodeid == 0) continue;
- ninfo = dm_hash_lookup_binary(node_hash,
- (char *)&member_list[i].nodeid,
- COROSYNC_CSID_LEN);
- if (!ninfo) {
- ninfo = malloc(sizeof(struct node_info));
- if (!ninfo) {
- break;
- }
- else {
- ninfo->nodeid = member_list[i].nodeid;
- dm_hash_insert_binary(node_hash,
- (char *)&ninfo->nodeid,
- COROSYNC_CSID_LEN, ninfo);
- }
- }
- ninfo->state = NODE_CLVMD;
- }
-
num_nodes = member_list_entries;
}
{
struct dm_hash_node *hn;
struct node_info *ninfo;
- int somedown = 0;
dm_hash_iterate(hn, node_hash)
{
DEBUGLOG("down_callback. node %d, state = %d\n", ninfo->nodeid,
ninfo->state);
- if (ninfo->state != NODE_DOWN)
- callback(master_client, csid, ninfo->state == NODE_CLVMD);
- if (ninfo->state != NODE_CLVMD)
- somedown = -1;
+ if (ninfo->state == NODE_CLVMD)
+ callback(master_client, csid, 1);
}
- return somedown;
+ return 0;
}
/* Real locking */