Blob Blame History Raw
From 31431b3c9f704ae81123c3e77d970386081c8680 Mon Sep 17 00:00:00 2001
From: Sakshi Bansal <sabansal@redhat.com>
Date: Fri, 20 May 2016 15:16:17 +0530
Subject: [PATCH 174/178] dht: selfheal should wind mkdir call to subvols with ESTALE error

upstream patch : http://review.gluster.org/#/c/14496/
3.7 release    : http://review.gluster.org/#/c/14497/

Change-Id: Iba8dfe312ab7dbef30849fab83023d72236d0758
BUG: 1286582
Signed-off-by: Sakshi Bansal <sabansal@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/75277
Reviewed-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
Tested-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
---
 xlators/cluster/dht/src/dht-selfheal.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index 83bbd0a..9c81b09 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -1276,7 +1276,8 @@ dht_selfheal_dir_mkdir_lookup_done (call_frame_t *frame, xlator_t *this)
                         "dict is NULL, need to make sure gfids are same");
 
         for (i = 0; i < layout->cnt; i++) {
-                if (layout->list[i].err == ENOENT ||
+                if (layout->list[i].err == ESTALE ||
+                    layout->list[i].err == ENOENT ||
                     local->selfheal.force_mkdir) {
                         gf_msg_debug (this->name, 0,
                                       "Creating directory %s on subvol %s",
-- 
1.7.1