From b337b755325f75a6fcf65616eaf4467b70b8b245 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Mon, 9 Apr 2012 18:21:43 +0530 Subject: 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 Reviewed-on: http://review.gluster.com/3109 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-utils.c | 31 +++--------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) (limited to 'xlators/mgmt') 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; } -- cgit