summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 63cbaa16c1f..e95bf9665c9 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -3546,8 +3546,8 @@ glusterd_spawn_daemons(void *opaque)
glusterd_conf_t *conf = THIS->private;
int ret = -1;
- synclock_lock(&conf->big_lock);
- glusterd_restart_bricks();
+ /* glusterd_restart_brick() will take the sync_lock. */
+ glusterd_restart_bricks(NULL);
glusterd_restart_gsyncds(conf);
glusterd_restart_rebalance(conf);
ret = glusterd_snapdsvc_restart();
@@ -6275,6 +6275,8 @@ glusterd_restart_bricks(void *opaque)
conf = this->private;
GF_VALIDATE_OR_GOTO(this->name, conf, return_block);
+ synclock_lock(&conf->big_lock);
+
/* We need to ensure that restarting the bricks during glusterd restart
* shouldn't race with the import volume thread (refer
* glusterd_compare_friend_data ())
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
index 67867f86913..0a2fffdbe63 100644
--- a/xlators/mgmt/glusterd/src/glusterd.h
+++ b/xlators/mgmt/glusterd/src/glusterd.h
@@ -1230,7 +1230,7 @@ glusterd_add_volume_detail_to_dict(glusterd_volinfo_t *volinfo, dict_t *volumes,
int count);
int
-glusterd_restart_bricks();
+glusterd_restart_bricks(void *opaque);
int32_t
glusterd_volume_txn(rpcsvc_request_t *req, char *volname, int flags,