From a28eb75c6cf5a30b5738b069fbfac370eb209628 Mon Sep 17 00:00:00 2001
From: N Balachandran <nbalacha@redhat.com>
Date: Mon, 8 May 2017 22:10:15 +0530
Subject: [PATCH 420/426] cluster/dht: Fix ret check
Fixed an incorrect return code check in the rebalance
code.
> BUG: 1448640
> Signed-off-by: N Balachandran <nbalacha@redhat.com>
> Reviewed-on: https://review.gluster.org/17197
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Change-Id: I60804ff121cec7a2f0419e2ee70dd22ea7533c0c
BUG: 1446165
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/105561
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
---
xlators/cluster/dht/src/dht-rebalance.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 49b2230..b2279d0 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -4132,7 +4132,7 @@ gf_defrag_start_crawl (void *data)
}
ret = gf_defrag_total_file_cnt (this, &loc);
- if (!ret) {
+ if (ret) {
gf_msg (this->name, GF_LOG_ERROR, 0, 0, "Failed to get "
"the total number of files. Unable to estimate "
"time to complete rebalance.");
--
1.8.3.1