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