diff options
author | Simone Gotti <simone.gotti@gmail.com> | 2010-05-04 16:48:55 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-05-09 21:41:46 -0700 |
commit | 8be447d390f2e0b7dee2edf46b20b75a9ff107dc (patch) | |
tree | 04150e817ea9fd6773e28a024df0b099848d3cea /xlators/cluster/afr/src/afr.c | |
parent | 45a2f82f659bf0af9e4bde403dad887f29d41e65 (diff) |
Unset split-brain flags in afr_self_heal_completion_cbk if self heal completes successfully.
Signed-off-by: Simone Gotti <simone.gotti@gmail.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 884 (I/O errors after fixed split brain and successfully completed self heal)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=884
Diffstat (limited to 'xlators/cluster/afr/src/afr.c')
-rw-r--r-- | xlators/cluster/afr/src/afr.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index a3f1e9acea0..718384717e4 100644 --- a/xlators/cluster/afr/src/afr.c +++ b/xlators/cluster/afr/src/afr.c @@ -88,7 +88,7 @@ out: void -afr_set_split_brain (xlator_t *this, inode_t *inode) +afr_set_split_brain (xlator_t *this, inode_t *inode, gf_boolean_t set) { uint64_t ctx = 0; int ret = 0; @@ -103,9 +103,12 @@ afr_set_split_brain (xlator_t *this, inode_t *inode) ctx = 0; } - ctx = (~AFR_ICTX_SPLIT_BRAIN_MASK & ctx) - | (0xFFFFFFFFFFFFFFFFULL & AFR_ICTX_SPLIT_BRAIN_MASK); - + if (set) { + ctx = (~AFR_ICTX_SPLIT_BRAIN_MASK & ctx) + | (0xFFFFFFFFFFFFFFFFULL & AFR_ICTX_SPLIT_BRAIN_MASK); + } else { + ctx = (~AFR_ICTX_SPLIT_BRAIN_MASK & ctx); + } __inode_ctx_put (inode, this, ctx); } UNLOCK (&inode->lock); @@ -501,7 +504,7 @@ afr_self_heal_lookup_unwind (call_frame_t *frame, xlator_t *this) local = frame->local; if (local->govinda_gOvinda) { - afr_set_split_brain (this, local->cont.lookup.inode); + afr_set_split_brain (this, local->cont.lookup.inode, _gf_true); } AFR_STACK_UNWIND (lookup, frame, local->op_ret, local->op_errno, |