diff options
author | Prashanth Pai <ppai@redhat.com> | 2017-11-03 11:53:12 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2017-11-06 03:56:48 +0000 |
commit | f461d75b226a5bc6c088280e43a96f9b54f33af5 (patch) | |
tree | 9c743476a35a85777f79c183c65363a1d184697b /xlators/mgmt/glusterd/src/glusterd-server-quorum.c | |
parent | 0f10b1a5caa78d723b3e8b879d1de162730913ce (diff) |
glusterd: Fix few coverity errors
Fixes issues 810, 248, 491, 499, 85, 786, 811, 43, and 44
from the report at [1].
[1]: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/
BUG: 789278
Change-Id: I27ebae2ffb2256b8eef0757d768cc46e5a942e9f
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-server-quorum.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-server-quorum.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-server-quorum.c b/xlators/mgmt/glusterd/src/glusterd-server-quorum.c index e1583c4a881..cc8fa963b50 100644 --- a/xlators/mgmt/glusterd/src/glusterd-server-quorum.c +++ b/xlators/mgmt/glusterd/src/glusterd-server-quorum.c @@ -364,16 +364,30 @@ glusterd_do_volume_quorum_action (xlator_t *this, glusterd_volinfo_t *volinfo, if (!glusterd_is_local_brick (this, volinfo, brickinfo)) continue; if (quorum_status == DOESNT_MEET_QUORUM) { - glusterd_brick_stop (volinfo, brickinfo, _gf_false); + ret = glusterd_brick_stop (volinfo, brickinfo, + _gf_false); + if (ret) { + gf_msg (this->name, GF_LOG_ERROR, 0, + GD_MSG_BRICK_STOP_FAIL, "Failed to " + "stop brick %s:%s", + brickinfo->hostname, brickinfo->path); + } } else { if (!brickinfo->start_triggered) { pthread_mutex_lock (&brickinfo->restart_mutex); { - glusterd_brick_start (volinfo, - brickinfo, - _gf_false); + ret = glusterd_brick_start (volinfo, + brickinfo, + _gf_false); } pthread_mutex_unlock (&brickinfo->restart_mutex); + if (ret) { + gf_msg (this->name, GF_LOG_ERROR, 0, + GD_MSG_BRICK_DISCONNECTED, + "Failed to start %s:%s", + brickinfo->hostname, + brickinfo->path); + } } } } |