From 53779e4458c17a3978675585e8099c97c8c2b3a2 Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Tue, 11 Feb 2014 02:22:32 +0000 Subject: glusterd/Vol-Locks : Moving globals into glusterd priv and code refactoring Moved globals(vol_lock and txn_opinfo dicts and global_txn_id) into glusterd priv Moved glusterd_op_send_cli_response() out of gd_unlock_op_phase as gd_unlock_op_phase and glusterd_clear_txn_opinfo should only be called if the txn id has been successfully generated. The cli resp should be sent irrespective of that. Changed log levels from ERROR to WARNING for some volume lock logs where the logs are expected and is not an error Added logs for better transparency of transaction ids. Change-Id: Ifac9b23aa9f1648c9ae252cfd3ac50bb2ed46728 BUG: 1011470 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/6976 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd.c') diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index 831cb82b2..a5f694545 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -1314,8 +1314,6 @@ init (xlator_t *this) glusterd_friend_sm_init (); glusterd_op_sm_init (); glusterd_opinfo_init (); - glusterd_vol_lock_init (); - glusterd_txn_opinfo_dict_init (); ret = glusterd_sm_tr_log_init (&conf->op_sm_log, glusterd_op_sm_state_name_get, glusterd_op_sm_event_name_get, @@ -1344,6 +1342,8 @@ init (xlator_t *this) } this->private = conf; + glusterd_vol_lock_init (); + glusterd_txn_opinfo_dict_init (); (void) glusterd_nodesvc_set_online_status ("glustershd", _gf_false); GLUSTERD_GET_HOOKS_DIR (hooks_dir, GLUSTERD_HOOK_VER, conf); -- cgit