]> sourceware.org Git - lvm2.git/commitdiff
Make clvmd cope with large gaps in nodeIDs
authorPatrick Caulfield <pcaulfie@redhat.com>
Thu, 30 Sep 2004 14:18:29 +0000 (14:18 +0000)
committerPatrick Caulfield <pcaulfie@redhat.com>
Thu, 30 Sep 2004 14:18:29 +0000 (14:18 +0000)
WHATS_NEW
daemons/clvmd/clvmd-cman.c

index 75f9824411aff4605c62532eb91bfd0bf0e1e84e..64653698de736c27d2e541923215c7cb637f520e 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -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
 =====================================
index a21515e638a61962d4c1deec68d27a20df082124..78b3eec46feb618cd75877e096b2c0a4023055dc 100644 (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;
This page took 0.041253 seconds and 5 git commands to generate.