From 1043dedfb54c80bdbb6e050920ced204515b226e Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Mon, 2 Apr 2012 16:52:10 +0530 Subject: dht/rebalance: Send PARENT_DOWN event before cleanup in rebalance To prevent any crashes, due to backend ops (e.g: afr self heal), sending GF_EVENT_PARENT_DOWN before calling cleanup_and_exit. Change-Id: I58c87c114bf259a69a8d081d291ca908b30ec407 BUG: 808402 Signed-off-by: shishir gowda Reviewed-on: http://review.gluster.com/3062 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi --- xlators/cluster/dht/src/dht-rebalance.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 783d153d0..2fcb9e3c0 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -1060,7 +1060,7 @@ gf_defrag_migrate_data (xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc, uuid_t node_uuid = {0,}; int readdir_operrno = 0; - gf_log (this->name, GF_LOG_INFO, "migate data called on %s", + gf_log (this->name, GF_LOG_INFO, "migrate data called on %s", loc->path); fd = fd_create (loc->inode, defrag->pid); if (!fd) { @@ -1479,6 +1479,8 @@ out: } UNLOCK (&defrag->lock); + xlator_notify (this, GF_EVENT_PARENT_DOWN, this); + if (defrag) GF_FREE (defrag); -- cgit