summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-07-06 12:22:20 +0530
committerXavier Hernandez <xhernandez@datalab.es>2015-07-06 04:24:13 -0700
commit69c48f592afad1eb15a1f355226bda077c2ec1ef (patch)
tree5085c8390436737373c42d6a203578b5d9cbcf35 /xlators/cluster
parentc6742adc98a9747f5e16c242aaddc28ea991ec5a (diff)
cluster/ec: Remove failed subvols from source/sink computation
Change-Id: Ib0de34c86ee25de361ec821d4015296c514742e0 BUG: 1240210 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11546 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/ec/src/ec-heal.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c
index 6ee1f9ee832..6f82203b66c 100644
--- a/xlators/cluster/ec/src/ec-heal.c
+++ b/xlators/cluster/ec/src/ec-heal.c
@@ -471,6 +471,8 @@ ec_heal_metadata_find_direction (ec_t *ec, default_args_cbk_t *replies,
for (i = 0; i < ec->nodes; i++) {
if (!replies[i].valid)
continue;
+ if (replies[i].op_ret < 0)
+ continue;
ret = ec_dict_del_array (replies[i].xdata, EC_XATTR_VERSION,
xattr, EC_VERSION_SIZE);
if (ret == 0) {
@@ -489,6 +491,8 @@ ec_heal_metadata_find_direction (ec_t *ec, default_args_cbk_t *replies,
same_count = 1;
source_ia = replies[i].stat;
for (j = i + 1; j < ec->nodes; j++) {
+ if (!replies[j].valid || replies[j].op_ret < 0)
+ continue;
child_ia = replies[j].stat;
if (!IA_EQUAL(source_ia, child_ia, gfid) ||
!IA_EQUAL(source_ia, child_ia, type) ||
@@ -517,7 +521,7 @@ ec_heal_metadata_find_direction (ec_t *ec, default_args_cbk_t *replies,
for (i = 0; i < ec->nodes; i++) {
if (groups[i] == groups[same_source])
sources[i] = 1;
- else if (replies[i].valid)
+ else if (replies[i].valid && replies[i].op_ret >= 0)
healed_sinks[i] = 1;
}
ret = same_source;
@@ -606,6 +610,7 @@ __ec_removexattr_sinks (call_frame_t *frame, ec_t *ec, inode_t *inode,
if (ret < 0) {
sources[i] = 0;
healed_sinks[i] = 0;
+ continue;
}
if (replies[i].xdata->count == 0) {