diff options
author | Anuradha <atalur@redhat.com> | 2015-06-05 16:46:39 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-06-25 22:55:52 -0700 |
commit | 4f76b8d11a93cfb74667f6b3051186b86c1ec55b (patch) | |
tree | c2251de58d546977b2d353987bc6ce9313030291 /xlators/mgmt/glusterd/src/glusterd-mgmt.h | |
parent | c9cbddf3d936f2bf1ac46084a74051096a5ac9a3 (diff) |
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 <atalur@redhat.com>
Reviewed-on: http://review.gluster.org/10076
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-mgmt.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-mgmt.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-mgmt.h b/xlators/mgmt/glusterd/src/glusterd-mgmt.h index a1f2d61686f..bf87ec710f1 100644 --- a/xlators/mgmt/glusterd/src/glusterd-mgmt.h +++ b/xlators/mgmt/glusterd/src/glusterd-mgmt.h @@ -45,4 +45,33 @@ glusterd_snap_pre_validate_use_rsp_dict (dict_t *dst, dict_t *src); int32_t glusterd_set_barrier_value (dict_t *dict, char *option); +int + +glusterd_mgmt_v3_initiate_lockdown (glusterd_op_t op, dict_t *dict, + char **op_errstr, uint32_t *op_errno, + gf_boolean_t *is_acquired, + uint32_t txn_generation); + +int +glusterd_mgmt_v3_build_payload (dict_t **req, char **op_errstr, dict_t *dict, + glusterd_op_t op); + +int +glusterd_mgmt_v3_pre_validate (glusterd_op_t op, dict_t *req_dict, + char **op_errstr, uint32_t *op_errno, + uint32_t txn_generation); + +int +glusterd_mgmt_v3_commit (glusterd_op_t op, dict_t *op_ctx, dict_t *req_dict, + char **op_errstr, uint32_t *op_errno, + uint32_t txn_generation); + +int +glusterd_mgmt_v3_release_peer_locks (glusterd_op_t op, dict_t *dict, + int32_t op_ret, char **op_errstr, + gf_boolean_t is_acquired, + uint32_t txn_generation); + +int32_t +glusterd_multiple_mgmt_v3_unlock (dict_t *dict, uuid_t uuid); #endif /* _GLUSTERD_MGMT_H_ */ |