summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2012-04-24 10:27:18 +0530
committerVijay Bellur <vijay@gluster.com>2012-04-25 04:05:35 -0700
commit8f2eba00fd315b42aeaa01d683b765fbd2ee111b (patch)
tree18ef5e7b1aa828fce4e2a2c8fa1dfdc54e8d35c0 /xlators/cluster/dht
parent3f35280a364bd35293d3e5804eb2a659a7f174b1 (diff)
rebalance: handshake_event_notify to make fsd talk to glusterd
Event_notify can be used by others to communicate with glusterd. A cbk event is also added for future use. req has a op, and dict. rsp has op_ret, op_errno, and dict. With this, rebalance process can update the status before exiting. Signed-off-by: shishir gowda <shishirng@gluster.com> Change-Id: If5c0ec00514eb3a109a790b2ea273317611e4562 BUG: 807126 Reviewed-on: http://review.gluster.com/3013 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/dht')
-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 8b32b3f6942..b3787f5cbe7 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -24,6 +24,7 @@
#endif
#include "dht-common.h"
+#include "xlator.h"
#define GF_DISK_SECTOR_SIZE 512
#define DHT_REBALANCE_PID 4242 /* Change it if required */
@@ -1414,6 +1415,7 @@ gf_defrag_start_crawl (void *data)
struct iatt parent = {0,};
dict_t *fix_layout = NULL;
dict_t *migrate_data = NULL;
+ dict_t *status = NULL;
this = data;
if (!this)
@@ -1482,7 +1484,11 @@ gf_defrag_start_crawl (void *data)
out:
LOCK (&defrag->lock);
{
- gf_defrag_status_get (defrag, NULL);
+ status = dict_new ();
+ gf_defrag_status_get (defrag, status);
+ glusterfs_rebalance_event_notify (status);
+ if (status)
+ dict_unref (status);
defrag->is_exiting = 1;
}
UNLOCK (&defrag->lock);