From 62ad0bf74a97c20fb06161df3b2dd89f100bf617 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: I726b2acd4025e2e75a87dea547ca6e088bc82c00 BUG: 1367272 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/15164 Reviewed-by: Ravishankar N NetBSD-regression: NetBSD Build System Reviewed-by: Pranith Kumar Karampuri Smoke: Gluster Build System Reviewed-by: Anuradha Talur CentOS-regression: Gluster Build System --- 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 0953ed9ddec..a9f7ad50fed 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -1068,11 +1068,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