summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-sm.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h1
4 files changed, 7 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.c b/xlators/mgmt/glusterd/src/glusterd-sm.c
index 47e559e748b..ba36b7f458a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-sm.c
@@ -1092,7 +1092,7 @@ out:
* the functions spawn process(es) only if they are not started yet.
*
* */
- glusterd_spawn_daemons ((void*) _gf_false);
+ glusterd_spawn_daemons (NULL);
glusterd_do_quorum_action ();
}
return ret;
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 950b5554d7a..7970777aefd 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -2416,10 +2416,12 @@ int
glusterd_spawn_daemons (void *opaque)
{
glusterd_conf_t *conf = THIS->private;
- gf_boolean_t start_bricks = (long) opaque;
+ gf_boolean_t start_bricks = !conf->restart_done;
- if (start_bricks)
+ if (start_bricks) {
glusterd_restart_bricks (conf);
+ conf->restart_done = _gf_true;
+ }
glusterd_restart_gsyncds (conf);
glusterd_restart_rebalance (conf);
return 0;
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 41a1cb368f8..3b419d2e052 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -1154,8 +1154,7 @@ init (xlator_t *this)
* time (this) glusterd was up.*/
if (list_empty (&conf->peers)) {
- glusterd_launch_synctask (glusterd_spawn_daemons,
- (void*) _gf_true);
+ glusterd_launch_synctask (glusterd_spawn_daemons, NULL);
}
ret = glusterd_options_init (this);
if (ret < 0)
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
index 49e7e727a89..9271a85439d 100644
--- a/xlators/mgmt/glusterd/src/glusterd.h
+++ b/xlators/mgmt/glusterd/src/glusterd.h
@@ -152,6 +152,7 @@ typedef struct {
gf_boolean_t pending_quorum_action;
dict_t *opts;
synclock_t big_lock;
+ gf_boolean_t restart_done;
} glusterd_conf_t;