From a1965b73da712644d1536d0dac3212041de5eb0c Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 6 Jan 2010 20:18:47 +0000 Subject: cluster/unify: don't call xl_init_tree on namespace node. - just before xl_init_tree call on namespace, unify node is set as parent of namespace node and since xl->ready of unify node is set only after return from init call, calling xl_init_tree on namespace node will result in execution of init of unify node for the second time. This results in following bugs: * since during second execution, parent of namespace node is unify, init of unify xlator fails. * even if init did not fail, re-execution of init in itself is bad, since it results in memory leaks etc. Worse, it can result in infinite recursive calls into init of unify node. Signed-off-by: Raghavendra G Signed-off-by: Anand V. Avati BUG: 518 (unify does not start) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=518 --- xlators/cluster/unify/src/unify.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/xlators/cluster/unify/src/unify.c b/xlators/cluster/unify/src/unify.c index 88ae4ca842b..6ce31da9dc6 100644 --- a/xlators/cluster/unify/src/unify.c +++ b/xlators/cluster/unify/src/unify.c @@ -4458,17 +4458,6 @@ init (xlator_t *this) parent = parent->next; parent->next = xlparent; } - /* Initialize the namespace volume */ - if (!ns_xl->ready) { - ret = xlator_tree_init (ns_xl); - if (ret) { - gf_log (this->name, GF_LOG_ERROR, - "initializing namespace node failed, " - "Exiting"); - FREE (_private); - return -1; - } - } } /* Tell namespace node that init is done */ -- cgit