summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
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-common.h
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-common.h')
-rw-r--r--xlators/cluster/dht/src/dht-common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index 11a14905b4b..d6ca0448b09 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -508,6 +508,7 @@ struct gf_defrag_info_ {
uint64_t total_failures;
uint64_t skipped;
uint64_t num_dirs_processed;
+ uint64_t size_processed;
gf_lock_t lock;
int cmd;
pthread_t th;
@@ -553,6 +554,10 @@ struct gf_defrag_info_ {
/* backpointer to make it easier to write functions for rebalance */
xlator_t *this;
+ pthread_cond_t fc_wakeup_cond;
+ pthread_mutex_t fc_mutex;
+
+
};
typedef struct gf_defrag_info_ gf_defrag_info_t;