summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-common.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-07-01 14:25:07 +0530
committerXavier Hernandez <xhernandez@datalab.es>2015-07-14 04:14:38 -0700
commit7766c0df5509e8acb6768c69d3f5642909781135 (patch)
tree2ef8ab0f8bc7bdc31d1d3d5176d3e8b46c6944cb /xlators/cluster/ec/src/ec-common.c
parent84ecb016cd2f1c8853c22e2df7d44d6c7bf32ed7 (diff)
cluster/ec: wind readlink on good subvol(s)
BUG: 1232172 Change-Id: I3a56e487840d86147dd85bf5fbe79b165eae289f Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11589 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-common.c')
-rw-r--r--xlators/cluster/ec/src/ec-common.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c
index 1c49eba7735..c54e043f5bb 100644
--- a/xlators/cluster/ec/src/ec-common.c
+++ b/xlators/cluster/ec/src/ec-common.c
@@ -596,13 +596,16 @@ void ec_dispatch_one(ec_fop_data_t * fop)
}
}
-int32_t ec_dispatch_one_retry(ec_fop_data_t *fop, int32_t idx, int32_t op_ret)
+gf_boolean_t
+ec_dispatch_one_retry(ec_fop_data_t *fop, ec_cbk_data_t *cbk)
{
- if (op_ret < 0) {
- return (ec_dispatch_next(fop, idx) >= 0);
- }
-
- return 0;
+ if ((cbk->op_ret < 0) && ec_is_recoverable_error (cbk->op_errno)) {
+ GF_ASSERT (fop->mask & (1ULL<<cbk->idx));
+ fop->mask ^= (1ULL << cbk->idx);
+ if (fop->mask)
+ return _gf_true;
+ }
+ return _gf_false;
}
void ec_dispatch_inc(ec_fop_data_t * fop)
@@ -1952,6 +1955,7 @@ void __ec_manager(ec_fop_data_t * fop, int32_t error)
fop->jobs = 1;
fop->state = fop->handler(fop, fop->state);
+ GF_ASSERT (fop->state >= 0);
error = ec_check_complete(fop, __ec_manager);
} while (error >= 0);