diff options
author | Anand Avati <avati@gluster.com> | 2009-10-12 11:26:59 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-10-12 10:18:32 -0700 |
commit | 5cec042dfa7d7c9699d3110f849a78b2569aa8d9 (patch) | |
tree | bdf9d5b1ca71faa155bad57afc7655a80d4742be | |
parent | a3da2ad4cd1c8c6adaa0f5055820541254f8c91d (diff) |
replicate: fix missing frame in entry-self-heal
when files on all backend nodes are missing, the logic in afr_sh_entry_erase_pending
is broken and results in missing lookup frame. this causes processes to enter into
uninterruptible sleep state.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 311 (missing frame (lookup) when entry-selfheal finds missing files in all backend nodes)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=311
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index 305cafdbe49..b44418dd68e 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -211,6 +211,7 @@ afr_sh_entry_erase_pending (call_frame_t *frame, xlator_t *this) int call_count = 0; int i = 0; dict_t **erase_xattr = NULL; + int need_unwind = 0; local = frame->local; @@ -231,6 +232,9 @@ afr_sh_entry_erase_pending (call_frame_t *frame, xlator_t *this) } } + if (call_count == 0) + need_unwind = 1; + afr_sh_delta_to_xattr (priv, sh->delta_matrix, erase_xattr, priv->child_count, AFR_ENTRY_TRANSACTION); @@ -260,6 +264,9 @@ afr_sh_entry_erase_pending (call_frame_t *frame, xlator_t *this) } FREE (erase_xattr); + if (need_unwind) + afr_sh_entry_finish (frame, this); + return 0; } |