summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/cluster/dht/src/dht-common.c4
-rw-r--r--xlators/cluster/dht/src/dht-common.h1
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c1
-rw-r--r--xlators/cluster/dht/src/tier.c2
4 files changed, 5 insertions, 3 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 37e07ad77da..20ad4f2bd72 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -3491,9 +3491,11 @@ dht_setxattr (call_frame_t *frame, xlator_t *this,
* data migration and set the frame->root->pid to
* GF_CLIENT_PID_TIER_DEFRAG in dht_setxattr() just before
* calling dht_start_rebalance_task() */
- tmp = dict_get (xattr, "tiering.migration");
+ tmp = dict_get (xattr, TIERING_MIGRATION_KEY);
if (tmp)
frame->root->pid = GF_CLIENT_PID_TIER_DEFRAG;
+ else
+ frame->root->pid = GF_CLIENT_PID_DEFRAG;
ret = dht_start_rebalance_task (this, frame);
if (!ret)
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index 45b6cc9e80b..7a5d40f9be2 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -32,6 +32,7 @@
#define DHT_FILE_MIGRATE_DOMAIN "dht.file.migrate"
#define DHT_LAYOUT_HEAL_DOMAIN "dht.layout.heal"
#define DHT_LAYOUT_HASH_INVALID 1
+#define TIERING_MIGRATION_KEY "tiering.migration"
#include <fnmatch.h>
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index fae856d969f..9c42af934e4 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -1383,7 +1383,6 @@ dht_start_rebalance_task (xlator_t *this, call_frame_t *frame)
{
int ret = -1;
- frame->root->pid = GF_CLIENT_PID_DEFRAG;
ret = synctask_new (this->ctx->env, rebalance_task,
rebalance_task_completion,
frame, frame);
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c
index 92d13f4f04b..2526604eaba 100644
--- a/xlators/cluster/dht/src/tier.c
+++ b/xlators/cluster/dht/src/tier.c
@@ -232,7 +232,7 @@ tier_migrate_using_query_file (void *_args)
* GF_CLIENT_PID_TIER_DEFRAG in dht_setxattr() just before
* calling dht_start_rebalance_task() */
per_file_status = dict_set_str (migrate_data,
- "tiering.migration", "yes");
+ TIERING_MIGRATION_KEY, "yes");
if (per_file_status) {
goto per_file_out;
}