summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2015-01-27 16:44:20 +0530
committerKaushal M <kaushal@redhat.com>2015-04-02 10:58:13 -0700
commitf66a85a484d41e68611f68d70e458c67f484d2e1 (patch)
tree6c0f9d051c987814b1c5e034f094a97a8c9c2e13 /xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
parent08d35497e30714058002b4b0095171f1dad73ddc (diff)
glusterd: compute quorum on peers in cluster
... and not on peers participating in an ongoing transaction. Change-Id: I6bdb80fd3bf3e7593fdf37e45a441d4a490469b8 BUG: 1205592 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/9493 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
index f27bb5d6e85..404866dff14 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
@@ -2559,8 +2559,7 @@ out:
int32_t
glusterd_snap_quorum_check_for_create (dict_t *dict, gf_boolean_t snap_volume,
- char **op_errstr,
- struct cds_list_head *peers_list)
+ char **op_errstr)
{
int8_t snap_force = 0;
int32_t force = 0;
@@ -2612,7 +2611,7 @@ glusterd_snap_quorum_check_for_create (dict_t *dict, gf_boolean_t snap_volume,
* information will be saved by glusterd and if glusterds are not in
* quorum, then better fail the snapshot
*/
- if (!does_gd_meet_server_quorum (this, peers_list, _gf_true)) {
+ if (!does_gd_meet_server_quorum (this)) {
snprintf (err_str, sizeof (err_str),
"glusterds are not in quorum");
gf_log (this->name, GF_LOG_WARNING, "%s", err_str);
@@ -2748,8 +2747,7 @@ out:
int32_t
glusterd_snap_quorum_check (dict_t *dict, gf_boolean_t snap_volume,
- char **op_errstr,
- struct cds_list_head *peers_list)
+ char **op_errstr)
{
int32_t ret = -1;
xlator_t *this = NULL;
@@ -2775,8 +2773,7 @@ glusterd_snap_quorum_check (dict_t *dict, gf_boolean_t snap_volume,
switch (snap_command) {
case GF_SNAP_OPTION_TYPE_CREATE:
ret = glusterd_snap_quorum_check_for_create (dict, snap_volume,
- op_errstr,
- peers_list);
+ op_errstr);
if (ret) {
gf_log (this->name, GF_LOG_WARNING, "Quorum check"
"failed during snapshot create command");
@@ -2785,7 +2782,7 @@ glusterd_snap_quorum_check (dict_t *dict, gf_boolean_t snap_volume,
break;
case GF_SNAP_OPTION_TYPE_CLONE:
- if (!does_gd_meet_server_quorum (this, peers_list, _gf_true)) {
+ if (!does_gd_meet_server_quorum (this)) {
ret = -1;
snprintf (err_str, sizeof (err_str),
"glusterds are not in quorum");
@@ -2800,7 +2797,7 @@ glusterd_snap_quorum_check (dict_t *dict, gf_boolean_t snap_volume,
break;
case GF_SNAP_OPTION_TYPE_DELETE:
case GF_SNAP_OPTION_TYPE_RESTORE:
- if (!does_gd_meet_server_quorum (this, peers_list, _gf_true)) {
+ if (!does_gd_meet_server_quorum (this)) {
ret = -1;
snprintf (err_str, sizeof (err_str),
"glusterds are not in quorum");