summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-common.c
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2015-10-26 14:14:18 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-10-26 05:41:33 -0700
commitda9f8bd6e9421209243afeabbad350cc1d70fdc5 (patch)
tree9566c64d0fe3d52ba6ceec0f481c62462f07f5b1 /xlators/cluster/afr/src/afr-common.c
parentfca25fbd0d24b6eb944415174a67d1774b5d2479 (diff)
afr: fixes in transaction code
Backport of http://review.gluster.org/#/c/12368/ and http://review.gluster.org/#/c/12415/ 1. When winding the pre-op, transaction.pre_op[i] is set. If the pre-op fails, transaction.failed_subvols[i] is set. If if fails on all chidren, we can directly proceed to unlock (via afr_changelog_post_op_now) without trying to wind the write, fail and then going to unlock. 2. 'fop_subvols' seems to be an unused variable, hence removing it. 3. Call local->transaction.wind() only on subvols where pre-op succeeded. Change-Id: I9525628daf48082e979b0093fa0478934495e61f BUG: 1273334 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/12399 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-common.c')
-rw-r--r--xlators/cluster/afr/src/afr-common.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 1c652f41e88..2ac0f078ffa 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -1204,7 +1204,6 @@ afr_local_transaction_cleanup (afr_local_t *local, xlator_t *this)
}
GF_FREE (local->transaction.eager_lock);
- GF_FREE (local->transaction.fop_subvols);
GF_FREE (local->transaction.failed_subvols);
GF_FREE (local->transaction.basename);
@@ -4176,12 +4175,6 @@ afr_transaction_local_init (afr_local_t *local, xlator_t *this)
goto out;
}
- local->transaction.fop_subvols = GF_CALLOC (sizeof (*local->transaction.fop_subvols),
- priv->child_count,
- gf_afr_mt_char);
- if (!local->transaction.fop_subvols)
- goto out;
-
local->transaction.failed_subvols = GF_CALLOC (sizeof (*local->transaction.failed_subvols),
priv->child_count,
gf_afr_mt_char);