From 84c3d7a83a8c84ca11514202a1bc365026fd1c87 Mon Sep 17 00:00:00 2001 From: Pranith K Date: Thu, 14 Jul 2011 06:30:40 +0000 Subject: cluster/afr: Detect conflict/gfid self-heals Added some helper functions that can be reused Signed-off-by: Pranith Kumar K Signed-off-by: Anand Avati BUG: 2745 (failure to detect split brain) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2745 --- xlators/cluster/afr/src/afr-open.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xlators/cluster/afr/src/afr-open.c') diff --git a/xlators/cluster/afr/src/afr-open.c b/xlators/cluster/afr/src/afr-open.c index 4aa587399b5..ab636a5b4b0 100644 --- a/xlators/cluster/afr/src/afr-open.c +++ b/xlators/cluster/afr/src/afr-open.c @@ -277,7 +277,8 @@ __unopened_count (int child_count, unsigned int *opened_on, unsigned char *child int -afr_openfd_sh_unwind (call_frame_t *frame, xlator_t *this) +afr_openfd_sh_unwind (call_frame_t *frame, xlator_t *this, int32_t op_ret, + int32_t op_errno) { afr_local_t *local = NULL; afr_private_t *priv = NULL; @@ -418,9 +419,8 @@ afr_openfd_sh (call_frame_t *frame, xlator_t *this) GF_ASSERT (local->loc.path); /* forcibly trigger missing-entries self-heal */ - local->success_count = 1; - local->enoent_count = 1; - + sh->need_missing_entry_self_heal = _gf_true; + sh->need_gfid_self_heal = _gf_true; sh->data_lock_held = _gf_true; sh->need_data_self_heal = _gf_true; sh->type = local->fd->inode->ia_type; -- cgit