summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2016-11-20 18:18:45 +0530
committerAtin Mukherjee <amukherj@redhat.com>2016-11-22 03:09:14 -0800
commit7b80a0f02fa0c27f5f5e89e69f92678145fd6a7f (patch)
treece3267a782d08781e83ae0b2d432ddc56bd53a23 /xlators/mgmt
parent25817a8c868b6c1b8149117f13e4216a99e453aa (diff)
glusterd: dump volinfo->dict in gluster get-state
Change-Id: I7e60629fb8003c620847fa63441f6b098db59721 BUG: 1396807 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/15889 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: Samikshan Bairagya <samikshan@gmail.com> Reviewed-by: Rohan Kanade <rkanade@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index de671c7f372..834456f323b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -4943,7 +4943,7 @@ glusterd_handle_get_vol_opt (rpcsvc_request_t *req)
}
static int
-glusterd_print_global_options (dict_t *opts, char *key, data_t *val, void *data)
+glusterd_print_dict_options (dict_t *opts, char *key, data_t *val, void *data)
{
FILE *fp = NULL;
@@ -5121,7 +5121,7 @@ glusterd_get_state (rpcsvc_request_t *req, dict_t *dict)
fprintf (fp, "\n[Global options]\n");
if (priv->opts)
- dict_foreach (priv->opts, glusterd_print_global_options, fp);
+ dict_foreach (priv->opts, glusterd_print_dict_options, fp);
rcu_read_lock ();
fprintf (fp, "\n[Peers]\n");
@@ -5344,6 +5344,10 @@ glusterd_get_state (rpcsvc_request_t *req, dict_t *dict)
volinfo->rep_brick.dst_brick->hostname,
volinfo->rep_brick.dst_brick->path);
}
+ fprintf (fp, "[Volume%d.options]\n", count);
+ if (volinfo->dict)
+ dict_foreach (volinfo->dict,
+ glusterd_print_dict_options, fp);
fprintf (fp, "\n");
}