From 5a5148f07a808d1b94a116eb41a9452bd58ed6bb Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Fri, 22 Jun 2012 13:28:31 +0530 Subject: cluster/dht: Remove dht dependency on glusterfsd-mgmt glusterfs_ctx->notify can be used by any xlator to talk to glusterfsd-mgmt. Note- This is for any rpc communication initiated by the xlator, and not from glusterd. Change-Id: Ic0e4af106fe1e98d797ca621facda8839b87598a BUG: 835757 Signed-off-by: shishir gowda Reviewed-on: http://review.gluster.com/3618 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Anand Avati --- xlators/cluster/dht/src/dht-rebalance.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'xlators/cluster') diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 88c84dd37..d2a59cc43 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -1427,11 +1427,16 @@ gf_defrag_start_crawl (void *data) dict_t *fix_layout = NULL; dict_t *migrate_data = NULL; dict_t *status = NULL; + glusterfs_ctx_t *ctx = NULL; this = data; if (!this) goto out; + ctx = glusterfs_ctx_get (); + if (!ctx) + goto out; + conf = this->private; if (!conf) goto out; @@ -1505,7 +1510,8 @@ out: { status = dict_new (); gf_defrag_status_get (defrag, status); - glusterfs_rebalance_event_notify (status); + if (ctx->notify) + ctx->notify (GF_EN_DEFRAG_STATUS, status); if (status) dict_unref (status); defrag->is_exiting = 1; -- cgit