summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-shared.c
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2017-07-03 13:13:35 +0530
committerRaghavendra G <rgowdapp@redhat.com>2017-07-10 14:35:34 +0000
commit9156a743aa76c955d18c9bfcb7c1a38ba00da890 (patch)
tree90910b7a652db912b6a92a6d730f2441a41bba5d /xlators/cluster/dht/src/dht-shared.c
parentb0d8afa2d2861f1191c4139e9aa9d4ba67e83135 (diff)
cluster/dht: Use size to calculate estimates
The earlier approach of using the number of files to determine when the rebalance would complete did not work well when file sizes differed widely. The new approach now gets the total data size and uses that information to determine how long the rebalance is expected to take. Change-Id: I84e80a0893efab72ff06130e4596fa71c9c8c868 BUG: 1467209 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: https://review.gluster.org/17668 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: MOHIT AGRAWAL <moagrawa@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-shared.c')
-rw-r--r--xlators/cluster/dht/src/dht-shared.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-shared.c b/xlators/cluster/dht/src/dht-shared.c
index a75c61190df..0373ebffe5a 100644
--- a/xlators/cluster/dht/src/dht-shared.c
+++ b/xlators/cluster/dht/src/dht-shared.c
@@ -742,6 +742,9 @@ dht_init (xlator_t *this)
pthread_cond_init (&defrag->rebalance_crawler_alarm, 0);
pthread_cond_init (&defrag->df_wakeup_thread, 0);
+ pthread_mutex_init (&defrag->fc_mutex, 0);
+ pthread_cond_init (&defrag->fc_wakeup_cond, 0);
+
defrag->global_error = 0;
}