diff options
| -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 77bc472c7..817cbbc32 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;  }  | 
