summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2020-04-27 16:59:16 +0530
committerSusant Palai <spalai@redhat.com>2020-07-31 16:22:23 +0000
commit3af9443c770837abe4f54db399623380ab9767a7 (patch)
tree943b631cc5210a721b90287cea201b03bf78a1fe /xlators/cluster/dht/src/dht-common.h
parentdbff4ecfc18d4d4ad357e2f53806a6caf69d2b65 (diff)
dht: optimize rebalance crawl path
For distribute only volumes we can use the information for local subvolumes to avoid syncop calls which goes through the whole stack to fetch stat and entries. A separate function gf_defrag_fix_layout_puredist is introduced. TODO: A glusterd flag needs to be introduced in case we want to fall back to run the old way. Perf numbers: DirSize - 1Million Old New %diff Depth - 100 (Run 1) 353 74 +377% Depth - 100 (Run 2) 348 72 +377~% Depth - 50 246 122 +100% Depth - 3 174 114 +52% Change-Id: I67cc136cebd34092fd775e69f74c2d5b33d3156d Fixes: #1242 Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r--xlators/cluster/dht/src/dht-common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index 028c6ac6b9f..84891406c71 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -598,6 +598,15 @@ struct gf_defrag_info_ {
gf_boolean_t stats;
/* lock migration flag */
gf_boolean_t lock_migration_enabled;
+
+ /* local system crawl */
+ char **local_brick_paths;
+
+ /* whether the volume is pure distribute */
+ gf_boolean_t is_pure_distribute;
+
+ /*TODO: Introduce a glusterd option to tune this behaviour*/
+ gf_boolean_t operate_dist;
};
typedef struct gf_defrag_info_ gf_defrag_info_t;
@@ -1482,4 +1491,6 @@ dht_set_parent_layout_in_dict(loc_t *loc, xlator_t *this, dht_local_t *local);
int
dht_dir_layout_error_check(xlator_t *this, inode_t *inode);
+int
+dht_get_brick_paths(xlator_t *this, dht_conf_t *conf, loc_t *loc);
#endif /* _DHT_H */