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