diff options
author | Vikas Gorur <vikas@gluster.com> | 2009-11-24 08:45:10 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-11-24 06:40:12 -0800 |
commit | 250edc9e494fe0c59eff580df18080111ecb475e (patch) | |
tree | 0e73af8f82f9f644abff21ee5b2f0309e276dc22 /xlators/cluster/afr/src/afr-self-heal-entry.c | |
parent | 74612a456ad1602f8038fae79fee654eb427602a (diff) |
cluster/afr: Refactored the self-heal interface.
Cleaned up the self-heal interface to callers.
Signed-off-by: Vikas Gorur <vikas@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-entry.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index 5c47d887e52..50d11cc18e2 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -2347,7 +2347,8 @@ afr_sh_entry_fix (call_frame_t *frame, xlator_t *this) sh->source = source; if (sh->background) { - sh->unwind (frame, this); + sh->unwind (sh->orig_frame, this); + sh->unwound = _gf_true; } heal: @@ -2410,7 +2411,8 @@ afr_sh_entry_lookup (call_frame_t *frame, xlator_t *this) local = frame->local; sh = &local->self_heal; - call_count = local->child_count; + call_count = afr_up_children_count (priv->child_count, + local->child_up); local->call_count = call_count; @@ -2507,7 +2509,8 @@ afr_sh_entry_lock (call_frame_t *frame, xlator_t *this) sh = &local->self_heal; priv = this->private; - call_count = local->child_count; + call_count = afr_up_children_count (priv->child_count, + local->child_up); local->call_count = call_count; @@ -2545,7 +2548,7 @@ afr_self_heal_entry (call_frame_t *frame, xlator_t *this) local = frame->local; sh = &local->self_heal; - if (local->need_entry_self_heal && priv->entry_self_heal) { + if (local->self_heal.need_entry_self_heal && priv->entry_self_heal) { afr_sh_entry_lock (frame, this); } else { gf_log (this->name, GF_LOG_TRACE, |