Red Hat Bugzilla – Bug 1476719
glusterd: flow in glusterd_validate_quorum() could be streamlined
Last modified: 2017-08-01 06:12:36 EDT
glusterd_validate_quorum performs unnecessary operations when the volume is not of server-quorum type "server". This could be optimized.
REVIEW: https://review.gluster.org/17924 (glusterd: streamline logic flow in glusterd_validate_quorum()) posted (#1) for review on master by Michael Adam (email@example.com)
COMMIT: https://review.gluster.org/17924 committed in master by Atin Mukherjee (firstname.lastname@example.org)
Author: Michael Adam <email@example.com>
Date: Tue Jun 13 14:44:39 2017 +0200
glusterd: streamline logic flow in glusterd_validate_quorum()
Make an earlier exit when the volume is not of server quorum.
Thereby it spares the actual quorum calculation in this case.
This also increases the overall readability of the function.
The patch is best seen with the --patience diff option to
understand what it does (e.g. "git show --patience").
Signed-off-by: Michael Adam <firstname.lastname@example.org>
Smoke: Gluster Build System <email@example.com>
Tested-by: Atin Mukherjee <firstname.lastname@example.org>
CentOS-regression: Gluster Build System <email@example.com>
Reviewed-by: Amar Tumballi <firstname.lastname@example.org>
Reviewed-by: Atin Mukherjee <email@example.com>