From 8eaa3506ead4f11b81b146a9e56575c79f3aad7b Mon Sep 17 00:00:00 2001 From: Anuradha Talur Date: Tue, 23 Feb 2016 10:56:51 +0530 Subject: afr : Enable auto heal when replica count increases This patch is part two change to prevent data loss in a replicate volume on doing a add-brick operation. Problem: After doing add-brick, there is a chance that self heal might happen from the newly added brick rather than the source brick, leading to data loss. Solution: Mark pending changelogs on afr children for the new afr-child so that heal is performed in the correct direction. Change-Id: I11871e55eef3593aec874f92214a2d97da229b17 BUG: 1276203 Signed-off-by: Anuradha Talur Reviewed-on: http://review.gluster.org/12454 Smoke: Gluster Build System Reviewed-by: Pranith Kumar Karampuri Tested-by: Pranith Kumar Karampuri CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System --- xlators/cluster/afr/src/afr.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'xlators/cluster/afr/src/afr.h') diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 41ffa4ecdb2..56682b47a56 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -778,11 +778,12 @@ typedef struct afr_spb_status { loc_t *loc; } afr_spb_status_t; -typedef struct afr_replace_brick_args { +typedef struct afr_empty_brick_args { call_frame_t *frame; loc_t loc; - int rb_index; -} afr_replace_brick_args_t; + int empty_index; + char *op_type; +} afr_empty_brick_args_t; typedef struct afr_read_subvol_args { ia_type_t ia_type; @@ -1118,4 +1119,6 @@ afr_set_need_heal (xlator_t *this, afr_local_t *local); int afr_selfheal_data_open (xlator_t *this, inode_t *inode, fd_t **fd); +int +afr_get_msg_id (char *op_type); #endif /* __AFR_H__ */ -- cgit