[Gluster-devel] [PATCH BUG:884] Unset split-brain flags in afr_self_heal_completion_cbk if self heal completes successfully.
Anand Babu Periasamy
ab at gluster.com
Sun May 16 02:13:51 UTC 2010
This one too. We should respond to patches, if we are not doing it already. Even if we
drop, we should politely let them know.
--
Anand Babu Periasamy
Blog [http://www.unlocksmith.org]
The writer must write what he has to say, not speak it. -- Hemingway, Ernest
On 05/04/2010 03:18 PM, Simone Gotti wrote:
>
> Signed-off-by: Simone Gotti<simone.gotti at gmail.com>
> ---
> xlators/cluster/afr/src/afr-self-heal-common.c | 4 +++-
> xlators/cluster/afr/src/afr.c | 13 ++++++++-----
> xlators/cluster/afr/src/afr.h | 2 +-
> 3 files changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
> index 30e1708..70b6cf8 100644
> --- a/xlators/cluster/afr/src/afr-self-heal-common.c
> +++ b/xlators/cluster/afr/src/afr-self-heal-common.c
> @@ -1504,7 +1504,9 @@ afr_self_heal_completion_cbk (call_frame_t *bgsh_frame, xlator_t *this)
> sh =&local->self_heal;
>
> if (local->govinda_gOvinda) {
> - afr_set_split_brain (this, local->cont.lookup.inode);
> + afr_set_split_brain (this, local->cont.lookup.inode, _gf_true);
> + } else {
> + afr_set_split_brain (this, local->cont.lookup.inode, _gf_false);
> }
>
> gf_log (this->name, GF_LOG_TRACE,
> diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
> index 5072869..50b6af1 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,
> diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
> index 0f7d8bb..4dc2d42 100644
> --- a/xlators/cluster/afr/src/afr.h
> +++ b/xlators/cluster/afr/src/afr.h
> @@ -615,7 +615,7 @@ uint64_t
> afr_is_split_brain (xlator_t *this, inode_t *inode);
>
> 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);
>
> int
> afr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
More information about the Gluster-devel
mailing list