summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2011-12-29 11:58:21 +0530
committerVijay Bellur <vijay@gluster.com>2011-12-28 22:47:14 -0800
commitc8c0942d1c890fd9b74c8e2fb3897bc96f9b9b82 (patch)
treec8a55adbe7ae8b48e4c418dc9ed3c784e5c24687 /xlators/cluster/afr
parent8de9cad2234109913cf090b93e77980603424e85 (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. Change-Id: Icd68c4a5cf05dd97c568964ab647a34fdb6e26f4 BUG: 765528 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2541 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr')
-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 8720f8ab778..c00c80b9f68 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -1773,8 +1773,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;