|
|
21ab4e |
From 5cf7c80a44b56ca6064affc94ae8061809d56227 Mon Sep 17 00:00:00 2001
|
|
|
21ab4e |
From: Atin Mukherjee <amukherj@redhat.com>
|
|
|
21ab4e |
Date: Tue, 25 Apr 2017 18:26:10 +0530
|
|
|
21ab4e |
Subject: [PATCH 404/406] glusterd: populate volinfo->rebal.time_left
|
|
|
21ab4e |
|
|
|
21ab4e |
While cherrypicking http://review.gluster.org/15893 for the rebalance
|
|
|
21ab4e |
estimation RFE, there was one small piece of code got missed out, this
|
|
|
21ab4e |
could be due to a manual mistake of resolving merge conflicts or the way
|
|
|
21ab4e |
git merge behaved which I am not sure.
|
|
|
21ab4e |
|
|
|
21ab4e |
Label: DOWNSTREAM ONLY
|
|
|
21ab4e |
|
|
|
21ab4e |
Change-Id: I91b52250c8ae2fedc8402516587d6b54c6012b90
|
|
|
21ab4e |
BUG: 1380598
|
|
|
21ab4e |
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
21ab4e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/104300
|
|
|
21ab4e |
Reviewed-by: Nithya Balachandran <nbalacha@redhat.com>
|
|
|
21ab4e |
---
|
|
|
21ab4e |
xlators/mgmt/glusterd/src/glusterd-utils.c | 10 ++++++----
|
|
|
21ab4e |
1 file changed, 6 insertions(+), 4 deletions(-)
|
|
|
21ab4e |
|
|
|
21ab4e |
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
21ab4e |
index 100c6fd..e9a5183 100644
|
|
|
21ab4e |
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
21ab4e |
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
|
|
|
21ab4e |
@@ -8262,6 +8262,10 @@ glusterd_defrag_volume_status_update (glusterd_volinfo_t *volinfo,
|
|
|
21ab4e |
gf_msg_trace (this->name, 0,
|
|
|
21ab4e |
"failed to get run-time");
|
|
|
21ab4e |
|
|
|
21ab4e |
+ ret2 = dict_get_uint64 (rsp_dict, "time-left", &time_left);
|
|
|
21ab4e |
+ if (ret2)
|
|
|
21ab4e |
+ gf_msg_trace (this->name, 0, "failed to get time left");
|
|
|
21ab4e |
+
|
|
|
21ab4e |
if (files)
|
|
|
21ab4e |
volinfo->rebal.rebalance_files = files;
|
|
|
21ab4e |
if (size)
|
|
|
21ab4e |
@@ -8276,10 +8280,8 @@ glusterd_defrag_volume_status_update (glusterd_volinfo_t *volinfo,
|
|
|
21ab4e |
volinfo->rebal.skipped_files = skipped;
|
|
|
21ab4e |
if (run_time)
|
|
|
21ab4e |
volinfo->rebal.rebalance_time = run_time;
|
|
|
21ab4e |
- ret2 = dict_get_uint64 (rsp_dict, "time-left", &time_left);
|
|
|
21ab4e |
- if (ret2)
|
|
|
21ab4e |
- gf_msg_trace (this->name, 0,
|
|
|
21ab4e |
- "failed to get time left");
|
|
|
21ab4e |
+ if (!ret2)
|
|
|
21ab4e |
+ volinfo->rebal.time_left = time_left;
|
|
|
21ab4e |
|
|
|
21ab4e |
if (promoted)
|
|
|
21ab4e |
volinfo->tier_info.promoted = promoted;
|
|
|
21ab4e |
--
|
|
|
21ab4e |
1.8.3.1
|
|
|
21ab4e |
|