diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2011-12-20 10:05:12 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-12-22 05:18:11 -0800 |
commit | d7d9f3d4002d31ceefed6ce80ec7567eca9ba6d3 (patch) | |
tree | c17e78eb3caee1df305bc612b22b402d36598037 /xlators/cluster/afr/src/afr-self-heal-entry.c | |
parent | 5ccbfdd87bebbc4c65a76c72191ac564ff844df8 (diff) |
cluster/afr: Set pargfid when missingv3.3.0qa18
client asserts for missing pargfid in case of unlink. So
Afr needs to make sure it is present in that fop.
Change-Id: Iea0ad65e1e7254c8df412942c52d5870e853aa51
BUG: 769055
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2495
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-entry.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index f87de0c1f51..3359029c3ac 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -475,7 +475,8 @@ afr_sh_entry_expunge_rmdir (call_frame_t *expunge_frame, xlator_t *this, int afr_sh_entry_expunge_remove (call_frame_t *expunge_frame, xlator_t *this, - int active_src, struct iatt *buf) + int active_src, struct iatt *buf, + struct iatt *parentbuf) { afr_private_t *priv = NULL; afr_local_t *expunge_local = NULL; @@ -484,6 +485,7 @@ afr_sh_entry_expunge_remove (call_frame_t *expunge_frame, xlator_t *this, int type = 0; afr_self_heal_t *sh = NULL; afr_local_t *local = NULL; + loc_t *loc = NULL; priv = this->private; expunge_local = expunge_frame->local; @@ -491,8 +493,11 @@ afr_sh_entry_expunge_remove (call_frame_t *expunge_frame, xlator_t *this, frame = expunge_sh->sh_frame; local = frame->local; sh = &local->self_heal; + loc = &expunge_local->loc; type = buf->ia_type; + if (loc->parent && uuid_is_null (loc->parent->gfid)) + uuid_copy (loc->pargfid, parentbuf->ia_gfid); switch (type) { case IA_IFSOCK: @@ -556,7 +561,8 @@ afr_sh_entry_expunge_lookup_cbk (call_frame_t *expunge_frame, void *cookie, goto out; } - afr_sh_entry_expunge_remove (expunge_frame, this, active_src, buf); + afr_sh_entry_expunge_remove (expunge_frame, this, active_src, buf, + postparent); return 0; out: |