diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2019-12-29 17:35:13 +0200 |
---|---|---|
committer | Ravishankar N <ravishankar@redhat.com> | 2020-01-02 06:23:18 +0000 |
commit | 5cfd4553d163b96c9c409db68264d1b6af2fe49e (patch) | |
tree | 5650de1ffafcd93ef78186270a36a1c7bac35604 /xlators/cluster/afr/src/afr-transaction.c | |
parent | 51c4002030da6b1a11f6e8f48bf117084b1da34d (diff) |
afr: simplify afr_has_quorum()
1. Perform AFR_COUNT() once, in afr_has_quorum() and pass the result
to afr_lookup_has_quorum()
2. Simplify afr_lookup_has_quorum() - pass less parameters to it.
(Via the change in item 1 above).
3. Make afr_is_add_replica_mount_lookup_on_root() static function.
4. Remove dead code - afr_decide_heal_info() which was not used.
Change-Id: If9168cd01e22788a0e60b91e315787d2aa60e97b
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-transaction.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-transaction.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index 88cb186dedb..78438f91331 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -873,7 +873,7 @@ afr_has_quorum(unsigned char *subvols, xlator_t *this, call_frame_t *frame) priv = this->private; up_children_count = AFR_COUNT(subvols, priv->child_count); - if (afr_lookup_has_quorum(frame, this, subvols)) + if (afr_lookup_has_quorum(frame, up_children_count)) return _gf_true; if (priv->quorum_count == AFR_QUORUM_AUTO) { |