summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2012-06-12 19:39:49 +0530
committerVijay Bellur <vijay@gluster.com>2012-06-14 04:55:12 -0700
commit27bc10d67b9502c03668ca851e8330485cb5e2b5 (patch)
tree407d5e3b6fe1ac5f8a126cca0a8718176e7480f3 /xlators/cluster
parenta04bbeafa9b96c0f05e6403749d2b8002b6c4f12 (diff)
cluster/afr: Treat EEXIST as success in hardlink
Change-Id: I6711fe9230553306eab6012edea8de157a336a78 BUG: 831151 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3549 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-entry.c12
1 files changed, 12 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 9fa128e4234..4db47c25726 100644
--- a/xlators/cluster/afr/src/afr-self-heal-entry.c
+++ b/xlators/cluster/afr/src/afr-self-heal-entry.c
@@ -1196,6 +1196,18 @@ afr_sh_entry_impunge_hardlink_cbk (call_frame_t *impunge_frame, void *cookie,
struct iatt *postparent, dict_t *xdata)
{
int call_count = 0;
+ afr_local_t *impunge_local = NULL;
+ afr_self_heal_t *impunge_sh = NULL;
+
+ impunge_local = impunge_frame->local;
+ impunge_sh = &impunge_local->self_heal;
+
+ if (IA_IFLNK == impunge_sh->entrybuf.ia_type) {
+ //For symlinks impunge is attempted un-conditionally
+ //So the file can already exist.
+ if ((op_ret < 0) && (op_errno == EEXIST))
+ op_ret = 0;
+ }
call_count = afr_frame_return (impunge_frame);
if (call_count == 0)