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