summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2018-04-27 16:40:02 +0530
committerJeff Darcy <jeff@pl.atyp.us>2018-04-30 19:36:03 +0000
commite2fda098112803bf651c4795952376cb8c1ad204 (patch)
treea40d542942310c591566ddded2614301b41fc28f /xlators/cluster
parent1bf8a8addb61d30177f0d10cec64a9dfcd0add92 (diff)
dht: gf_defrag_settle_hash should ignore ENOENT and ESTALE error
Problem: A directory deletion can happen just before gf_defrag_settle_hash which internally does a setxattr operation on a directory. Solution: Ignore ENOENT and ESTALE errors Fixes: bz#1572581 Change-Id: I2f91809f3b5e02976c4c3a5a596406a8b2f8f6f2 Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index c5237585185..91fb94d529c 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -3616,8 +3616,15 @@ gf_defrag_settle_hash (xlator_t *this, gf_defrag_info_t *defrag,
ret = syncop_setxattr (this, loc, fix_layout, 0, NULL, NULL);
if (ret) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_msg (this->name, GF_LOG_ERROR, -ret,
+ DHT_MSG_LAYOUT_FIX_FAILED,
"fix layout on %s failed", loc->path);
+
+ if (-ret == ENOENT || -ret == ESTALE) {
+ /* Dir most likely is deleted */
+ return 0;
+ }
+
return -1;
}