From 4f76b8d11a93cfb74667f6b3051186b86c1ec55b Mon Sep 17 00:00:00 2001 From: Anuradha Date: Fri, 5 Jun 2015 16:46:39 +0530 Subject: glusterd/ afr : set afr pending xattrs on replace brick This patch is part one change to prevent data loss in a replicate volume on doing a replace-brick commit force operation. Problem: After doing replace-brick commit force, there is a chance that self heal happens from the replaced (sink) brick rather than the source brick leading to data loss. Solution: During the commit phase of replace brick, after old brick is brought down, create a temporary mount and perform setfattr operation (on virtual xattr) indicating AFR to mark the replaced brick as sink. As a part of this change replace-brick command is being changed to use mgmt_v3 framework rather than op-state-machine framework. Many thanks to Krishnan Parthasarathi for helping me out on this. Change-Id: If0d51b5b3cef5b34d5672d46ea12eaa9d35fd894 BUG: 1207829 Signed-off-by: Anuradha Reviewed-on: http://review.gluster.org/10076 Tested-by: NetBSD Build System Reviewed-by: Ravishankar N Reviewed-by: Pranith Kumar Karampuri --- xlators/mgmt/glusterd/src/glusterd-op-sm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.h b/xlators/mgmt/glusterd/src/glusterd-op-sm.h index 42b4252c73b..67b2742520e 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.h +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.h @@ -229,9 +229,6 @@ glusterd_check_option_exists(char *optstring, char **completion); int set_xlator_option (dict_t *dict, char *key, char *value); -void -glusterd_do_replace_brick (void *data); - char* glusterd_op_sm_state_name_get (int state); @@ -293,4 +290,7 @@ glusterd_generate_txn_id (dict_t *dict, uuid_t **txn_id); void glusterd_set_opinfo (char *errstr, int32_t op_errno, int32_t op_ret); + +int +glusterd_dict_set_volid (dict_t *dict, char *volname, char **op_errstr); #endif -- cgit