diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-05-10 07:55:46 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2007-05-10 07:55:46 +1000 |
commit | a8f83423f438aed2183b66dc46b33c082da3f159 (patch) | |
tree | 11ba1bacf78b8b47fec19210d1872b82674d18d3 /ctdb/common/cmdline.c | |
parent | ba47b43c6b577f92e1729552c3aac0441dc3796b (diff) | |
download | samba-a8f83423f438aed2183b66dc46b33c082da3f159.tar.gz |
moved the vnn_map initialisation out of the cmdline code
(This used to be ctdb commit 81492b840d608dc724d5a25ddef6eb0ce12b95fb)
Diffstat (limited to 'ctdb/common/cmdline.c')
-rw-r--r-- | ctdb/common/cmdline.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/ctdb/common/cmdline.c b/ctdb/common/cmdline.c index 3b95f7cc60a..8a7dbbe7d59 100644 --- a/ctdb/common/cmdline.c +++ b/ctdb/common/cmdline.c @@ -89,7 +89,7 @@ struct poptOption popt_ctdb_cmdline[] = { struct ctdb_context *ctdb_cmdline_init(struct event_context *ev) { struct ctdb_context *ctdb; - int i, ret; + int ret; if (ctdb_cmdline.nlist == NULL) { printf("You must provide a node list with --nlist\n"); @@ -156,26 +156,6 @@ struct ctdb_context *ctdb_cmdline_init(struct event_context *ev) } } - /* initialize the vnn mapping table */ -/* -XXX we currently initialize it to the maximum number of nodes to -XXX make it behave the same way as previously. -XXX Once we have recovery working we should initialize this always to -XXX generation==0 (==invalid) and let the recovery tool populate this -XXX table for the daemons. -*/ - ctdb->vnn_map = talloc_zero_size(ctdb, offsetof(struct ctdb_vnn_map, map) + 4*ctdb->num_nodes); - if (ctdb->vnn_map == NULL) { - DEBUG(0,(__location__ " Unable to allocate vnn_map structure\n")); - exit(1); - } - ctdb->vnn_map->generation = 1; - ctdb->vnn_map->size = ctdb->num_nodes; - for(i=0;i<ctdb->vnn_map->size;i++){ - ctdb->vnn_map->map[i] = i%ctdb->num_nodes; - } - - return ctdb; } |