1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Make clvmd cope with large gaps in nodeIDs

This commit is contained in:
Patrick Caulfield 2004-09-30 14:18:29 +00:00
parent 896318f475
commit cf54177475
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,8 @@
Version 2.00.26 -
=====================================
Make clvmd fork later so it can return more error codes.
Make clvmd cope with large gaps in node numbers IDs.
Version 2.00.25 - 29th September 2004
=====================================

View File

@ -257,17 +257,18 @@ void add_up_node(char *csid)
int nodeid = nodeid_from_csid(csid);
if (nodeid >= max_updown_nodes) {
int *new_updown = realloc(node_updown, max_updown_nodes + 10);
int new_size = nodeid + 10;
int *new_updown = realloc(node_updown, new_size);
if (new_updown) {
node_updown = new_updown;
max_updown_nodes += 10;
max_updown_nodes = new_size;
DEBUGLOG("realloced more space for nodes. now %d\n",
max_updown_nodes);
} else {
log_error
("Realloc failed. Node status for clvmd will be wrong\n");
return;
("Realloc failed. Node status for clvmd will be wrong. quitting\n");
exit(999);
}
}
node_updown[nodeid] = 1;