summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-common.c
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2014-08-21 17:27:17 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2014-09-02 07:57:22 -0700
commit6c4325ca57bca72d10e5172f8423262cdb3a379c (patch)
treeb1337a1865d4b5500fda362fb4bf8324c0f9d3c7 /xlators/cluster/afr/src/afr-common.c
parent2c0a694b8d910c530899077c1d242ad1ea250965 (diff)
cluster/afr: Propagate EIO on inode's type mismatch
Original author of the test script: Pranith Kumar K <pkarampu@redhat.com> Change-Id: If515ecefd3c17f85f175b6a8cb4b78ce8c916de2 BUG: 1132469 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/8574 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-common.c')
-rw-r--r--xlators/cluster/afr/src/afr-common.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 8ab67af405f..2a6b0c957fb 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -1219,9 +1219,8 @@ afr_lookup_done (call_frame_t *frame, xlator_t *this)
continue;
}
- if (!uuid_compare (replies[i].poststat.ia_gfid,
- read_gfid))
- continue;
+ if (!uuid_compare (replies[i].poststat.ia_gfid, read_gfid))
+ continue;
can_interpret = _gf_false;
@@ -1442,6 +1441,7 @@ afr_attempt_local_discovery (xlator_t *this, int32_t child_index)
int
afr_lookup_selfheal_wrap (void *opaque)
{
+ int ret = 0;
call_frame_t *frame = opaque;
afr_local_t *local = NULL;
xlator_t *this = NULL;
@@ -1450,19 +1450,25 @@ afr_lookup_selfheal_wrap (void *opaque)
local = frame->local;
this = frame->this;
- afr_selfheal_name (frame->this, local->loc.pargfid, local->loc.name,
- &local->cont.lookup.gfid_req);
+ ret = afr_selfheal_name (frame->this, local->loc.pargfid,
+ local->loc.name, &local->cont.lookup.gfid_req);
+ if (ret == -EIO)
+ goto unwind;
afr_local_replies_wipe (local, this->private);
inode = afr_selfheal_unlocked_lookup_on (frame, local->loc.parent,
local->loc.name, local->replies,
- local->child_up);
+ local->child_up, NULL);
if (inode)
inode_unref (inode);
+
afr_lookup_done (frame, this);
+ return 0;
- return 0;
+unwind:
+ AFR_STACK_UNWIND (lookup, frame, -1, EIO, NULL, NULL, NULL, NULL);
+ return 0;
}