diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2014-06-03 11:55:49 +0530 |
---|---|---|
committer | Kaushal M <kaushal@redhat.com> | 2014-06-04 02:01:24 -0700 |
commit | 1f95e55cc633e9b082b4eb37a6a825c0e33ac5c8 (patch) | |
tree | 867b4f95cd7137362825b30a0eb6d2005930038a | |
parent | 31520d9334f9a40aa329d54651bca7e2c2e5d545 (diff) |
mgmt/glusterd: return proper value upon quorum failure in snapshot create
Change-Id: I5474a7cdf03236121bef383955ab403e945cd7ae
BUG: 1101561
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/7961
Reviewed-by: Sachin Pandit <spandit@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 6f48767b8a3..540e97b8633 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -12607,7 +12607,7 @@ glusterd_snap_quorum_check_for_create (dict_t *dict, gf_boolean_t snap_volume, int64_t volcount = 0; char key[PATH_MAX] = {0, }; int64_t i = 0; - int32_t ret = 0; + int32_t ret = -1; xlator_t *this = NULL; this = THIS; @@ -12630,6 +12630,7 @@ glusterd_snap_quorum_check_for_create (dict_t *dict, gf_boolean_t snap_volume, if (!snap) { gf_log (this->name, GF_LOG_ERROR, "failed to " "get the snapshot %s", snapname); + ret = -1; goto out; } } @@ -12649,6 +12650,7 @@ glusterd_snap_quorum_check_for_create (dict_t *dict, gf_boolean_t snap_volume, gf_log (this->name, GF_LOG_WARNING, "%s", err_str); *op_errstr = gf_strdup (err_str); + ret = -1; goto out; } |