summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2017-05-05 22:19:36 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2017-05-12 13:36:40 +0000
commit3769fe7bf3c2674cf3ed233e79afd039e1ce6ddc (patch)
treebcbd9a5eeb2795f599d41716a509b515f633676e /xlators
parenta9c09c5fe97c6861fa3b500b690ebd5df063d0be (diff)
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 /<fuse_mount>/.meta/graphs/active/testvol-replicate-X/private. Also added a test-case. Change-Id: I91367c5250b26efb35e5f7d7c397def09cc77cbc BUG: 1449921 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: https://review.gluster.org/17243 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-common.c8
1 files changed, 8 insertions, 0 deletions
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;
}