diff options
author | Krishnan Parthasarathi <kp@gluster.com> | 2012-04-09 18:21:43 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-04-12 22:19:09 -0700 |
commit | b337b755325f75a6fcf65616eaf4467b70b8b245 (patch) | |
tree | 4a5ec35af555073c61bc9e2488c593385645164a /xlators/mgmt/glusterd/src/glusterd-utils.c | |
parent | e46a57fda716c00b7c490be74485863c80d6f7b4 (diff) |
glusterd: Removed 'unprotected' concurrent access of priv->volumes on glusterd restart
This must have been removed as part of
afe542eca18888463798747d2a95e5a9d239a4a0 (reverting to non-synctask behaviour).
Change-Id: Ic23c8bbf8f90f4c9af6e68349de63e22d7f25606
BUG: 810829
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3109
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 77bc472c7a8..817cbbc323e 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -3341,20 +3341,13 @@ out: return ret; } -void * -glusterd_brick_restart_proc (void *data) +int +glusterd_restart_bricks (glusterd_conf_t *conf) { - glusterd_conf_t *conf = NULL; glusterd_volinfo_t *volinfo = NULL; glusterd_brickinfo_t *brickinfo = NULL; gf_boolean_t start_nodesvcs = _gf_false; - - conf = data; - - GF_ASSERT (conf); - - /* set the proper 'THIS' value as it is new thread */ - THIS = conf->xl; + int ret = 0; list_for_each_entry (volinfo, &conf->volumes, vol_list) { /* If volume status is not started, do not proceed */ @@ -3370,24 +3363,6 @@ glusterd_brick_restart_proc (void *data) if (start_nodesvcs) glusterd_nodesvcs_handle_graph_change (NULL); - return NULL; -} - -int -glusterd_restart_bricks (glusterd_conf_t *conf) -{ - int ret = 0; - - conf->xl = THIS; - ret = pthread_create (&conf->brick_thread, NULL, - glusterd_brick_restart_proc, - conf); - if (ret != 0) { - gf_log (THIS->name, GF_LOG_DEBUG, - "pthread_create() failed (%s)", - strerror (errno)); - } - return ret; } |