From 3769fe7bf3c2674cf3ed233e79afd039e1ce6ddc Mon Sep 17 00:00:00 2001 From: Ravishankar N Date: Fri, 5 May 2017 22:19:36 +0530 Subject: afr: include quorum type and count when dumping afr priv Squash of https://review.gluster.org/17196 and https://review.gluster.org/17215 Dump the client quorum type ('auto', 'fixed' or 'none'). If it is 'fixed', also dump the quorum-count. This information will be available in the client statedump and in //.meta/graphs/active/testvol-replicate-X/private. Also added a test-case. Change-Id: I91367c5250b26efb35e5f7d7c397def09cc77cbc BUG: 1449921 Signed-off-by: Ravishankar N Reviewed-on: https://review.gluster.org/17243 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Shyamsundar Ranganathan --- xlators/cluster/afr/src/afr-common.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xlators') diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 32dfc9e58eb..34d9e56911e 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -4540,6 +4540,14 @@ afr_priv_dump (xlator_t *this) gf_proc_dump_write("background-self-heal-count", "%d", priv->background_self_heal_count); gf_proc_dump_write("healers", "%d", priv->healers); + if (priv->quorum_count == AFR_QUORUM_AUTO) { + gf_proc_dump_write ("quorum-type", "auto"); + } else if (priv->quorum_count == 0) { + gf_proc_dump_write ("quorum-type", "none"); + } else { + gf_proc_dump_write("quorum-type", "fixed"); + gf_proc_dump_write("quorum-count", "%d", priv->quorum_count); + } return 0; } -- cgit