cead9d
From c0efaa98d777e4520028bf55482846b3ef5fca3a Mon Sep 17 00:00:00 2001
cead9d
From: Susant Palai <spalai@redhat.com>
cead9d
Date: Wed, 1 Apr 2020 12:14:31 +0530
cead9d
Subject: [PATCH 359/362] dht: gf_defrag_process_dir is called even if
cead9d
 gf_defrag_fix_layout has failed
cead9d
cead9d
Currently even though gf_defrag_fix_layout fails with ENOENT or ESTALE, a
cead9d
subsequent call is made to gf_defrag_process_dir leading to rebalance failure.
cead9d
cead9d
upstream patch: https://review.gluster.org/#/c/glusterfs/+/24225
cead9d
cead9d
> fixes: #1102
cead9d
> Change-Id: Ib0c309fd78e89a000fed3feb4bbe2c5b48e61478
cead9d
> Signed-off-by: Susant Palai <spalai@redhat.com>
cead9d
cead9d
BUG: 1812789
cead9d
Change-Id: Ib0c309fd78e89a000fed3feb4bbe2c5b48e61478
cead9d
Signed-off-by: Susant Palai <spalai@redhat.com>
cead9d
Reviewed-on: https://code.engineering.redhat.com/gerrit/196249
cead9d
Reviewed-by: Mohit Agrawal <moagrawa@redhat.com>
cead9d
Tested-by: RHGS Build Bot <nigelb@redhat.com>
cead9d
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
cead9d
---
cead9d
 xlators/cluster/dht/src/dht-rebalance.c | 1 +
cead9d
 1 file changed, 1 insertion(+)
cead9d
cead9d
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
cead9d
index 559f046..f4c62b8 100644
cead9d
--- a/xlators/cluster/dht/src/dht-rebalance.c
cead9d
+++ b/xlators/cluster/dht/src/dht-rebalance.c
cead9d
@@ -3939,6 +3939,7 @@ gf_defrag_fix_layout(xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
cead9d
                 defrag->total_failures++;
cead9d
             }
cead9d
             ret = 0;
cead9d
+            goto out;
cead9d
         } else {
cead9d
             gf_msg(this->name, GF_LOG_ERROR, -ret, DHT_MSG_LAYOUT_FIX_FAILED,
cead9d
                    "Setxattr failed for %s", loc->path);
cead9d
-- 
cead9d
1.8.3.1
cead9d