|
|
f338ef |
From 167980565e1ab56989b25fe6aa0203aeb7970c8b Mon Sep 17 00:00:00 2001
|
|
|
f338ef |
From: Sanju Rakonde <srakonde@redhat.com>
|
|
|
f338ef |
Date: Sun, 6 Oct 2019 19:05:28 +0530
|
|
|
f338ef |
Subject: [PATCH 306/307] cli: fix distCount value
|
|
|
f338ef |
|
|
|
f338ef |
gluster volume info --xml id displaying wrong distCount
|
|
|
f338ef |
value. This patch addresses it.
|
|
|
f338ef |
|
|
|
f338ef |
> fixes: bz#1758878
|
|
|
f338ef |
> Change-Id: I64081597e06018361e6524587b433b0c4b2a0260
|
|
|
f338ef |
> Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
f338ef |
|
|
|
f338ef |
upstream patch: https://review.gluster.org/#/c/glusterfs/+/23521/
|
|
|
f338ef |
|
|
|
f338ef |
BUG: 1758618
|
|
|
f338ef |
Change-Id: I64081597e06018361e6524587b433b0c4b2a0260
|
|
|
f338ef |
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
f338ef |
Reviewed-on: https://code.engineering.redhat.com/gerrit/183147
|
|
|
f338ef |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
f338ef |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
f338ef |
---
|
|
|
f338ef |
cli/src/cli-xml-output.c | 5 +++--
|
|
|
f338ef |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
f338ef |
|
|
|
f338ef |
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
|
|
|
f338ef |
index b417bb8..006e2fb 100644
|
|
|
f338ef |
--- a/cli/src/cli-xml-output.c
|
|
|
f338ef |
+++ b/cli/src/cli-xml-output.c
|
|
|
f338ef |
@@ -2548,8 +2548,9 @@ cli_xml_output_vol_info(cli_local_t *local, dict_t *dict)
|
|
|
f338ef |
ret = dict_get_int32(dict, key, &dist_count);
|
|
|
f338ef |
if (ret)
|
|
|
f338ef |
goto out;
|
|
|
f338ef |
- ret = xmlTextWriterWriteFormatElement(
|
|
|
f338ef |
- local->writer, (xmlChar *)"distCount", "%d", dist_count);
|
|
|
f338ef |
+ ret = xmlTextWriterWriteFormatElement(local->writer,
|
|
|
f338ef |
+ (xmlChar *)"distCount", "%d",
|
|
|
f338ef |
+ (brick_count / dist_count));
|
|
|
f338ef |
XML_RET_CHECK_AND_GOTO(ret, out);
|
|
|
f338ef |
|
|
|
f338ef |
snprintf(key, sizeof(key), "volume%d.stripe_count", i);
|
|
|
f338ef |
--
|
|
|
f338ef |
1.8.3.1
|
|
|
f338ef |
|