diff options
-rw-r--r-- | xlators/cluster/dht/src/tier.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c index b9ed7550b2c..199a344754e 100644 --- a/xlators/cluster/dht/src/tier.c +++ b/xlators/cluster/dht/src/tier.c @@ -517,6 +517,15 @@ tier_migrate_using_query_file (void *_args) goto out; } + if (defrag->defrag_status != GF_DEFRAG_STATUS_STARTED) { + ret = -1; + gf_msg (this->name, GF_LOG_ERROR, 0, + DHT_MSG_LOG_TIER_ERROR, + "Exiting tier migration as" + "defrag status is not started"); + goto out; + } + ret = gettimeofday (¤t_time, NULL); if (ret < 0) { gf_msg (this->name, GF_LOG_ERROR, 0, |