summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-rebalance.c
diff options
context:
space:
mode:
authorDan Lambright <dlambrig@redhat.com>2015-09-01 20:26:15 -0400
committerDan Lambright <dlambrig@redhat.com>2015-09-02 10:24:26 -0700
commit9f27ef94827e5b73276887011153633291549cda (patch)
tree66a89371f44c692e4373c15500fae82c760a2f54 /xlators/cluster/dht/src/dht-rebalance.c
parent44dc74645144bfbca4aa0f08e36972359645a42c (diff)
cluster/tier: make attach/detach work with new rebalance logic
This is a backport of 10795. > The new rebalance performance improvements added new > datastructures which were not initialized in the > tier case. Function dht_find_local_subvol_cbk() needs > to accept a list built by lower level DHT translators > in order to build the local subvolumes list. > Change-Id: Iab03fc8e7fadc22debc08cd5bc781b9e3e270497 > BUG: 1222088 > Signed-off-by: Dan Lambright <dlambrig@redhat.com> > Reviewed-on: http://review.gluster.org/10795 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Change-Id: Icbd51c96ae4d367d1edf41cdd0edb35095195699 BUG: 1259079 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/12085 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-rebalance.c')
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index d38aeccf885..8cbfca07d96 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -2743,8 +2743,7 @@ gf_defrag_start_crawl (void *data)
goto out;
}
- if ((defrag->cmd != GF_DEFRAG_CMD_START_TIER) &&
- (defrag->cmd != GF_DEFRAG_CMD_START_LAYOUT_FIX)) {
+ if (defrag->cmd != GF_DEFRAG_CMD_START_LAYOUT_FIX) {
migrate_data = dict_new ();
if (!migrate_data) {
defrag->total_failures++;
@@ -2841,11 +2840,7 @@ gf_defrag_start_crawl (void *data)
}
methods->migration_other(this, defrag);
if (defrag->cmd == GF_DEFRAG_CMD_START_DETACH_TIER) {
- migrate_data = dict_new ();
- if (!migrate_data) {
- ret = -1;
- goto out;
- }
+
ret = dict_set_str (migrate_data,
GF_XATTR_FILE_MIGRATE_KEY,
"force");