diff options
author | Vikas Gorur <vikas@gluster.com> | 2009-11-24 07:41:36 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-11-24 05:23:04 -0800 |
commit | 3fe840d93730f1f7feef053e58dfbc40f99cae04 (patch) | |
tree | a23495e515d611e062f80d30ba3217f3565407d3 /xlators/cluster/afr/src/afr.c | |
parent | 4a43031ce0f045b673a50159dce5316bcae825ee (diff) |
cluster/afr: Fix inode context bitmasks.
Set opendir_done and split_brain flags correctly
in the inode context.
Signed-off-by: Vikas Gorur <vikas@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 249 (Self heal of a file that does not exist on the first subvolume)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=249
Diffstat (limited to 'xlators/cluster/afr/src/afr.c')
-rw-r--r-- | xlators/cluster/afr/src/afr.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index 3f1928157a9..d6c1d8bcf7f 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, int32_t split_brain) +afr_set_split_brain (xlator_t *this, inode_t *inode) { uint64_t ctx = 0; int ret = 0; @@ -104,7 +104,7 @@ afr_set_split_brain (xlator_t *this, inode_t *inode, int32_t split_brain) } ctx = (~AFR_ICTX_SPLIT_BRAIN_MASK & ctx) - | (split_brain & AFR_ICTX_SPLIT_BRAIN_MASK); + | (0xFFFFFFFFFFFFFFFFULL & AFR_ICTX_SPLIT_BRAIN_MASK); __inode_ctx_put (inode, this, ctx); } @@ -142,7 +142,7 @@ out: void -afr_set_opendir_done (xlator_t *this, inode_t *inode, int32_t opendir_done) +afr_set_opendir_done (xlator_t *this, inode_t *inode) { uint64_t ctx = 0; int ret = 0; @@ -158,7 +158,7 @@ afr_set_opendir_done (xlator_t *this, inode_t *inode, int32_t opendir_done) } ctx = (~AFR_ICTX_OPENDIR_DONE_MASK & ctx) - | (opendir_done & AFR_ICTX_OPENDIR_DONE_MASK); + | (0xFFFFFFFFFFFFFFFFULL & AFR_ICTX_OPENDIR_DONE_MASK); __inode_ctx_put (inode, this, ctx); } @@ -474,9 +474,7 @@ afr_self_heal_cbk (call_frame_t *frame, xlator_t *this) local = frame->local; if (local->govinda_gOvinda) { - afr_set_split_brain (this, local->cont.lookup.inode, 1); - } else { - afr_set_split_brain (this, local->cont.lookup.inode, 0); + afr_set_split_brain (this, local->cont.lookup.inode); } AFR_STACK_UNWIND (lookup, frame, local->op_ret, local->op_errno, |