summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-inode-write.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-05-27 15:47:07 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-06-03 06:24:00 -0700
commit0a012d82717562896831c12103f91839f6269259 (patch)
tree367977b523f91039bb97b12da78f2c7ae4db1165 /xlators/cluster/afr/src/afr-inode-write.c
parent0c2fb5d80e248f8b49e0ed13de0165c30429a072 (diff)
cluster/afr: Unwind xdata_rsp even in case of failures
DHT expects GF_PREOP_CHECK_FAILED to be present in xdata_rsp in case of mkdir failures because of stale layout. But AFR was unwinding null xdata_rsp in case of failures. This was leading to mkdir failures just after remove-brick. Unwind the xdata_rsp in case of failures to make sure the response from brick reaches dht. >BUG: 1340623 >Change-Id: Idd3f7b95730e8ea987b608e892011ff190e181d1 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14553 >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Ravishankar N <ravishankar@redhat.com> >Smoke: Gluster Build System <jenkins@build.gluster.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Anuradha Talur <atalur@redhat.com> >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> BUG: 1340992 Change-Id: I2641d35a851be692aa223dfea5d082245ac6c2bc Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14633 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-inode-write.c')
-rw-r--r--xlators/cluster/afr/src/afr-inode-write.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c
index 4fdf7b5bd0c..04067f589a5 100644
--- a/xlators/cluster/afr/src/afr-inode-write.c
+++ b/xlators/cluster/afr/src/afr-inode-write.c
@@ -89,7 +89,7 @@ __afr_inode_write_finalize (call_frame_t *frame, xlator_t *this)
&args);
else
read_subvol = afr_data_subvol_get (local->inode, this,
- NULL, NULL, &args);
+ NULL, NULL, NULL, &args);
}
local->op_ret = -1;
@@ -169,8 +169,8 @@ __afr_inode_write_fill (call_frame_t *frame, xlator_t *this, int child_index,
local->replies[child_index].poststat = *postbuf;
if (xattr)
local->replies[child_index].xattr = dict_ref (xattr);
- if (xdata)
- local->replies[child_index].xdata = dict_ref (xdata);
+ if (xdata)
+ local->replies[child_index].xdata = dict_ref (xdata);
} else {
afr_transaction_fop_failed (frame, this, child_index);
}