diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2016-08-05 12:18:05 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-08-15 03:40:54 -0700 |
commit | 79b9ad3dfa146ef29ac99bf87d1c31f5a6fe1fef (patch) | |
tree | 2aee85d8b4603037bad4a864693bad0e27d155e9 /xlators | |
parent | db4e26ed71a01e5f760fbc3c7051962426f102c9 (diff) |
cluster/afr: Bug fixes in txn codepath
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: I78ccd39106bd4959441821355a82572659e3affb
BUG: 1363721
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/15145
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Anuradha Talur <atalur@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/afr/src/afr-transaction.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index df4662258bb..274e90d6f3c 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; } |