summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/afr/src/afr-common.c')
-rw-r--r--xlators/cluster/afr/src/afr-common.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 7c38d65ed3b..e6b0881fc9d 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -210,11 +210,15 @@ afr_inode_get_ctx (xlator_t *this, inode_t *inode, afr_inode_params_t *params)
fresh_children[i] = ctx->fresh_children[i];
break;
case AFR_INODE_GET_OPENDIR_DONE:
- params->u.value = ctx->masks &
- AFR_ICTX_OPENDIR_DONE_MASK;
+ params->u.value = _gf_false;
+ if (ctx->masks & AFR_ICTX_OPENDIR_DONE_MASK)
+ params->u.value = _gf_true;
break;
case AFR_INODE_GET_SPLIT_BRAIN:
- params->u.value = ctx->masks & AFR_ICTX_SPLIT_BRAIN_MASK;
+ params->u.value = _gf_false;
+ if (ctx->masks & AFR_ICTX_SPLIT_BRAIN_MASK)
+ params->u.value = _gf_true;
+ ;
break;
default:
GF_ASSERT (0);
@@ -225,7 +229,7 @@ unlock:
UNLOCK (&inode->lock);
}
-uint64_t
+gf_boolean_t
afr_is_split_brain (xlator_t *this, inode_t *inode)
{
afr_inode_params_t params = {0};