From bbcdbd8c36c7756f39bb7464cd1c69b67e66cfaa Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Fri, 15 Mar 2013 11:20:53 -0700 Subject: synctask: minor enhancements - Enhance syncenv_new() to accept scaling parameters of syncproc. Previously the scaling parameters were hardcoded and decided at compile time. - New API synctask_create() which returns the created synctask. This is similar to synctask_new which only returned the status of whether a synctask could be created or not. The meaning of NULL cbk in synctask_create() means the task is "joinable". Until synctask_join() is called on such a synctask, the task is not reaped and resources are not destroyed. The task would be in a zombie state after synctask_fn returns and before synctask_join() is called. Change-Id: I368ec9037de9510d2ba951f0aad86aaf18d9a6b6 BUG: 986775 Signed-off-by: Anand Avati Reviewed-on: http://review.gluster.org/5365 Tested-by: Gluster Build System Reviewed-by: Brian Foster --- xlators/cluster/afr/src/pump.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'xlators') diff --git a/xlators/cluster/afr/src/pump.c b/xlators/cluster/afr/src/pump.c index c7b85869..a7f72fb3 100644 --- a/xlators/cluster/afr/src/pump.c +++ b/xlators/cluster/afr/src/pump.c @@ -2538,7 +2538,7 @@ init (xlator_t *this) goto out; } - pump_priv->env = syncenv_new (0); + pump_priv->env = this->ctx->env; if (!pump_priv->env) { gf_log (this->name, GF_LOG_ERROR, "Could not create new sync-environment"); @@ -2579,9 +2579,6 @@ fini (xlator_t *this) if (!pump_priv) goto afr_priv; - if (pump_priv->env) - syncenv_destroy (pump_priv->env); - GF_FREE (pump_priv->resume_path); LOCK_DESTROY (&pump_priv->resume_path_lock); LOCK_DESTROY (&pump_priv->pump_state_lock); -- cgit