diff options
author | Krishnan Parthasarathi <kp@gluster.com> | 2012-04-03 15:37:25 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-04-12 23:07:08 -0700 |
commit | 8a45a0e480f7e8c6ea1195f77ce3810d4817dc37 (patch) | |
tree | 9b50579b53228f6a605b4c74e36fe0fb7a3827e2 /xlators/mgmt/glusterd/src/glusterd-utils.h | |
parent | b337b755325f75a6fcf65616eaf4467b70b8b245 (diff) |
glusterd: Added volume-id to 'op' dictionary
Volume-id passed in op dictionary would help detect possible split brains
among peers in a cluster. The idea is to check if the volume's id and
the vol-id that was passed are equal.
ie, same volume name, but different volume id indicate that glusterd
'metadata' of one of the participating peers is stale or there is
a split brain.
This is over and above the existing checksum based validation of peer
supplied cluster 'metadata' (ie, volume info file).
Change-Id: I1049ef249e417e540ccb4243e450f92fcd0f46f9
BUG: 797734
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3083
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index 5491c7a0068..602dc780fef 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -432,4 +432,6 @@ glusterd_get_brickinfo_by_position (glusterd_volinfo_t *volinfo, uint32_t pos); gf_boolean_t glusterd_is_local_brick (xlator_t *this, glusterd_volinfo_t *volinfo, glusterd_brickinfo_t *brickinfo); +int +glusterd_validate_volume_id (dict_t *op_dict, glusterd_volinfo_t *volinfo); #endif |