summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2011-12-29 11:58:21 +0530
committerVijay Bellur <vijay@gluster.com>2012-06-10 10:20:00 -0700
commitf067918725ead7276fa4f0bfa1dca1be3459378e (patch)
tree3ac4fe6888af555e06da3a2f6dbd6fb4c01b91ae
parent2533d2b56be0f61b498a62478714036310704a25 (diff)
cluster/afr: EIO should overwrite ENOENT in lookup
In case if lookup decides there is a gfid-mismatch, some enoents and self-heal cant remove the stale entry, it tells lookup to unwind with EIO but since ENOENT has more priority it is not over-written, this patch fixes that case. BUG: 765528 Change-Id: Ida03685629be8126365d660a16d8f9252f7ca030 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2675 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--xlators/cluster/afr/src/afr-common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index d9c42cbcd..bb8afb35f 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -1462,8 +1462,9 @@ afr_error_more_important (int32_t old_errno, int32_t new_errno)
if (old_errno == ESTALE)
ret = _gf_false;
- /* Nothing should overwrite ENOENT, except ESTALE */
- else if ((old_errno == ENOENT) && (new_errno != ESTALE))
+ /* Nothing should overwrite ENOENT, except ESTALE/EIO*/
+ else if ((old_errno == ENOENT) && (new_errno != ESTALE)
+ && (new_errno != EIO))
ret = _gf_false;
return ret;