1
0
mirror of https://github.com/gluster/glusterfs.git synced 2026-02-05 15:48:40 +01:00

cli: fix distCount value

gluster volume info --xml id displaying wrong distCount
value. This patch addresses it.

fixes: bz#1758878

Change-Id: I64081597e06018361e6524587b433b0c4b2a0260
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
This commit is contained in:
Sanju Rakonde
2019-10-06 19:05:28 +05:30
committed by Atin Mukherjee
parent 9cfaef0960
commit 3016bfa40c

View File

@@ -2507,8 +2507,9 @@ cli_xml_output_vol_info(cli_local_t *local, dict_t *dict)
ret = dict_get_int32(dict, key, &dist_count);
if (ret)
goto out;
ret = xmlTextWriterWriteFormatElement(
local->writer, (xmlChar *)"distCount", "%d", dist_count);
ret = xmlTextWriterWriteFormatElement(local->writer,
(xmlChar *)"distCount", "%d",
(brick_count / dist_count));
XML_RET_CHECK_AND_GOTO(ret, out);
snprintf(key, sizeof(key), "volume%d.stripe_count", i);