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