From e65e066c4f993aac626112e718ee66d35d15c6a8 Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Fri, 5 Aug 2016 12:18:05 +0530 Subject: cluster/afr: Bug fixes in txn codepath Backport of: http://review.gluster.org/15145 AFR sets transaction.pre_op[] array even before actually doing the pre-op on-disk. Therefore, AFR must not only consider the pre_op[] array but also the failed_subvols[] information before setting the pre_op_done[] flag. This patch fixes that. Change-Id: I8163256a6de254be43a7a526c6d2f9dc30e0e1df BUG: 1367270 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/15162 Reviewed-by: Ravishankar N NetBSD-regression: NetBSD Build System Reviewed-by: Pranith Kumar Karampuri Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Anuradha Talur --- xlators/cluster/afr/src/afr-transaction.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators') diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index a20be30d3ca..155cf5fe1ec 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -1060,11 +1060,11 @@ afr_changelog_pre_op_update (call_frame_t *frame, xlator_t *this) if (!fd_ctx->on_disk[type]) { for (i = 0; i < priv->child_count; i++) fd_ctx->pre_op_done[type][i] = - local->transaction.pre_op[i]; + (!local->transaction.failed_subvols[i]); } else { for (i = 0; i < priv->child_count; i++) if (fd_ctx->pre_op_done[type][i] != - local->transaction.pre_op[i]) { + (!local->transaction.failed_subvols[i])) { local->transaction.no_uninherit = 1; goto unlock; } -- cgit