summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorshishir gowda <sgowda@redhat.com>2012-06-22 13:28:31 +0530
committerAnand Avati <avati@redhat.com>2012-06-29 17:25:46 -0700
commit5a5148f07a808d1b94a116eb41a9452bd58ed6bb (patch)
tree158b9db246d14799e813ff19650de98b4b1ba15a /xlators
parent5672e77d3102a990a2aa11e7e56ebfe6a0eee369 (diff)
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 <sgowda@redhat.com> Reviewed-on: http://review.gluster.com/3618 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 88c84dd37ec..d2a59cc4312 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;