summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr
diff options
context:
space:
mode:
authorkarthik-us <ksubrahm@redhat.com>2017-03-18 13:44:56 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2017-03-27 05:52:31 -0400
commitf91596e6566c605e70a31a60523d11f78a097c3c (patch)
treef96cdcc5e22a477f6c5a4060f2225deb18591989 /xlators/cluster/afr
parent6c14e55377cc0080da88c5b997f5f7ea2374393b (diff)
cluster/afr: Undo pending xattrs only on the up bricks
Problem: While doing conservative merge, even if a brick is down, it will reset the pending xattr on that. When that brick comes up, as part of the heal, it will consider this brick as the source and removes the entries on the other bricks, which leads to data loss. Fix: Undo pending only for the bricks which are up. Change-Id: I18436fa0bb1faa5f60531b357dea3f6b20446303 BUG: 1433571 Signed-off-by: karthik-us <ksubrahm@redhat.com> Reviewed-on: https://review.gluster.org/16913 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Diffstat (limited to 'xlators/cluster/afr')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index 69d1fd72e01..6b5e50d6c56 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -248,7 +248,7 @@ afr_selfheal_undo_pending (call_frame_t *frame, xlator_t *this, inode_t *inode,
output_matrix[i][j] = 1;
if (type == AFR_ENTRY_TRANSACTION)
full_heal_mtx_out[i][j] = 1;
- } else {
+ } else if (locked_on[j]) {
output_matrix[i][j] = -input_matrix[i][j];
if (type == AFR_ENTRY_TRANSACTION)
full_heal_mtx_out[i][j] = -full_heal_mtx_in[i][j];