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:
parent
896318f475
commit
cf54177475
@ -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
|
||||
=====================================
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user