|
|
9ae3f9 |
From c184943bdf38de5b4cbf165fd1cd98ce7bd9e976 Mon Sep 17 00:00:00 2001
|
|
|
9ae3f9 |
From: hari gowtham <hgowtham@redhat.com>
|
|
|
9ae3f9 |
Date: Tue, 16 Jun 2020 14:47:53 +0530
|
|
|
9ae3f9 |
Subject: [PATCH 452/456] Tier/DHT: Handle the pause case missed out
|
|
|
9ae3f9 |
|
|
|
9ae3f9 |
Problem: While backporting a change from master
|
|
|
9ae3f9 |
the changes related to tier were removed. This started affecting
|
|
|
9ae3f9 |
the tier pause functionality. Backporting it
|
|
|
9ae3f9 |
to downstream left this usecase messed up as we still support tier.
|
|
|
9ae3f9 |
patch that caused this: https://code.engineering.redhat.com/gerrit/#/c/202647/2
|
|
|
9ae3f9 |
|
|
|
9ae3f9 |
Fix: add the condition back for tier pause to work.
|
|
|
9ae3f9 |
|
|
|
9ae3f9 |
Label: DOWNSTREAM ONLY
|
|
|
9ae3f9 |
|
|
|
9ae3f9 |
BUG: 1844359
|
|
|
9ae3f9 |
Change-Id: I46c6c179b09c7e1a729be9fd257fa4a490f0287e
|
|
|
9ae3f9 |
Signed-off-by: hari gowtham <hgowtham@redhat.com>
|
|
|
9ae3f9 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/203560
|
|
|
9ae3f9 |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
9ae3f9 |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
9ae3f9 |
---
|
|
|
9ae3f9 |
xlators/cluster/dht/src/dht-rebalance.c | 9 +++++++++
|
|
|
9ae3f9 |
1 file changed, 9 insertions(+)
|
|
|
9ae3f9 |
|
|
|
9ae3f9 |
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
|
|
|
9ae3f9 |
index e9974cd..abc10fc 100644
|
|
|
9ae3f9 |
--- a/xlators/cluster/dht/src/dht-rebalance.c
|
|
|
9ae3f9 |
+++ b/xlators/cluster/dht/src/dht-rebalance.c
|
|
|
9ae3f9 |
@@ -1160,6 +1160,15 @@ __dht_rebalance_migrate_data(xlator_t *this, gf_defrag_info_t *defrag,
|
|
|
9ae3f9 |
break;
|
|
|
9ae3f9 |
}
|
|
|
9ae3f9 |
|
|
|
9ae3f9 |
+ if ((defrag && defrag->cmd == GF_DEFRAG_CMD_START_TIER) &&
|
|
|
9ae3f9 |
+ (gf_defrag_get_pause_state(&defrag->tier_conf) != TIER_RUNNING)) {
|
|
|
9ae3f9 |
+ gf_msg("tier", GF_LOG_INFO, 0, DHT_MSG_TIER_PAUSED,
|
|
|
9ae3f9 |
+ "Migrate file paused");
|
|
|
9ae3f9 |
+ ret = -1;
|
|
|
9ae3f9 |
+ break;
|
|
|
9ae3f9 |
+ }
|
|
|
9ae3f9 |
+
|
|
|
9ae3f9 |
+
|
|
|
9ae3f9 |
offset += ret;
|
|
|
9ae3f9 |
total += ret;
|
|
|
9ae3f9 |
|
|
|
9ae3f9 |
--
|
|
|
9ae3f9 |
1.8.3.1
|
|
|
9ae3f9 |
|