summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2009-10-12 11:21:22 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-12 10:18:47 -0700
commit42e8f30a7c8e6fa7755aa058a2ef73542c7e8f0e (patch)
treec65538d84cfbe4767f3649db4bde975811081dd9
parent358b284535dc7e98d9817c8f63d7659098f5e427 (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.c7
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 624118616..f3759b113 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;
}