From ce86c132347f0a788ab50ffbd6795a2eb982074e Mon Sep 17 00:00:00 2001 From: Venkatesh Somyajulu Date: Fri, 3 Jan 2014 13:54:25 +0530 Subject: cluster/afr: Unable to self heal symbolic links Problem: Under the entry self heal, readlink is done at the source and sink. When readlink is done at the sink, because link is not present at the sink, afr expects ENOENT. AFR translator takes decisions for new link creation based on ENOENT but server translator is modified to return ESTALE because of which afr xlator is not able to heal. Fix: The check for inode absence at server includes ESTALE as well. Change-Id: I319e4cb4156a243afee79365b7b7a5a7823e9a24 BUG: 1046624 Signed-off-by: Venkatesh Somyajulu Reviewed-on: http://review.gluster.org/6599 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/cluster/afr/src/afr-self-heal-entry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/cluster/afr/src/afr-self-heal-entry.c') diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index 0ca06aaa3..00f1a9cb9 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -1530,7 +1530,7 @@ afr_sh_entry_impunge_readlink_sink_cbk (call_frame_t *impunge_frame, void *cooki child_index = (long) cookie; - if ((op_ret == -1) && (op_errno != ENOENT)) { + if ((op_ret == -1) && (!afr_inode_missing(op_errno))) { gf_log (this->name, GF_LOG_INFO, "readlink of %s on %s failed (%s)", impunge_local->loc.path, @@ -1541,7 +1541,7 @@ afr_sh_entry_impunge_readlink_sink_cbk (call_frame_t *impunge_frame, void *cooki /* symlink doesn't exist on the sink */ - if ((op_ret == -1) && (op_errno == ENOENT)) { + if ((op_ret == -1) && (afr_inode_missing(op_errno))) { afr_sh_entry_impunge_symlink (impunge_frame, this, child_index, impunge_sh->linkname); return 0; -- cgit