diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2012-02-14 22:40:34 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-02-20 21:23:21 -0800 |
commit | 5f117a4a1fca3ec2d163fe77615cf6859c0450e4 (patch) | |
tree | 695913cadfb8d8fdacd240bf5e84dcb78a0cfdbc /xlators/cluster/afr/src/afr-common.c | |
parent | 8456c28af75a4083286fc6ceadc03f2703f4c9b6 (diff) |
cluster/afr: Self-heald, Index integration
Change-Id: Ic68eb00b356a6ee3cb88fe2bde50374be7a64ba3
BUG: 763820
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2749
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-common.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index a5dee65f621..1895150cd1d 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -3448,6 +3448,8 @@ afr_notify (xlator_t *this, int32_t event, priv->child_up[idx] = 1; priv->up_count++; + call_psh = 1; + up_child = idx; for (i = 0; i < priv->child_count; i++) if (priv->child_up[i] == 1) up_children++; @@ -3457,12 +3459,6 @@ afr_notify (xlator_t *this, int32_t event, "going online.", ((xlator_t *)data)->name); } else { event = GF_EVENT_CHILD_MODIFIED; - gf_log (this->name, GF_LOG_INFO, "subvol %d came up, " - "start crawl", idx); - if (had_heard_from_all) { - call_psh = 1; - up_child = idx; - } } priv->last_event[idx] = event; @@ -3551,18 +3547,15 @@ afr_notify (xlator_t *this, int32_t event, } } UNLOCK (&priv->lock); - if (up_children > 1) { - gf_log (this->name, GF_LOG_INFO, "All subvolumes came " - "up, start crawl"); - call_psh = 1; - } } ret = 0; if (propagate) ret = default_notify (this, event, data); - if (call_psh) - afr_proactive_self_heal (this, up_child); + if (call_psh) { + gf_log (this->name, GF_LOG_DEBUG, "start crawl: %d", up_child); + afr_do_poll_self_heal ((void*) (long) up_child); + } out: return ret; |