diff options
author | Joseph Fernandes <josferna@redhat.com> | 2014-06-30 08:07:36 +0530 |
---|---|---|
committer | Kaushal M <kaushal@redhat.com> | 2014-07-04 01:27:22 -0700 |
commit | 9a50211cdb3d6decac140a31a035bd6e145f5f2f (patch) | |
tree | 7abc63564e7a3892370715c476e42f6cbf573ef6 /xlators/mgmt/glusterd/src/glusterd-utils.h | |
parent | dc46d5e84f88c5cc869b78ba9db32ed4035b9121 (diff) |
glusterd/snapshot: fixing glusterd quorum during snap operation
During a snapshot operation, glusterd quorum will be checked only
on transaction peers, which are selected in the begin of the
operation, and not on the entire peer list which is susceptible
for change for any peer attach operation.
Change-Id: I089e3262cb45bc1ea4a3cef48408a9039d3fbdb9
BUG: 1114403
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/8200
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index 8d3af0689fd..aef28de1b8d 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -36,6 +36,14 @@ volinfo->volname, brickid);\ } while (0) +#define glusterd_quorum_count(peerinfo, inquorum_count, active_count, _exit)\ + if (peerinfo->quorum_contrib == QUORUM_WAITING)\ + goto _exit;\ + if (_is_contributing_to_quorum (peerinfo->quorum_contrib))\ + inquorum_count = inquorum_count + 1;\ + if (active_count && (peerinfo->quorum_contrib == QUORUM_UP))\ + *active_count = *active_count + 1;\ + struct glusterd_lock_ { uuid_t owner; time_t timestamp; @@ -591,7 +599,8 @@ glusterd_do_quorum_action (); int glusterd_get_quorum_cluster_counts (xlator_t *this, int *active_count, - int *quorum_count); + int *quorum_count, + gf_boolean_t _xaction_peers); int glusterd_get_next_global_opt_version_str (dict_t *opts, char **version_str); @@ -602,7 +611,7 @@ glusterd_is_volume_in_server_quorum (glusterd_volinfo_t *volinfo); gf_boolean_t glusterd_is_any_volume_in_server_quorum (xlator_t *this); gf_boolean_t -does_gd_meet_server_quorum (xlator_t *this); +does_gd_meet_server_quorum (xlator_t *this, gf_boolean_t _xaction_peers); int glusterd_generate_and_set_task_id (dict_t *dict, char *key); |