3604df
From e1b1fff65f21ffc7a134e41b1b37977ee4cc75d4 Mon Sep 17 00:00:00 2001
3604df
From: Atin Mukherjee <amukherj@redhat.com>
3604df
Date: Sun, 20 Nov 2016 18:18:45 +0530
3604df
Subject: [PATCH 188/206] glusterd: dump volinfo->dict in gluster get-state
3604df
3604df
>Reviewed-on: http://review.gluster.org/15889
3604df
>Smoke: Gluster Build System <jenkins@build.gluster.org>
3604df
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
3604df
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
3604df
>Reviewed-by: Samikshan Bairagya <samikshan@gmail.com>
3604df
>Reviewed-by: Rohan Kanade <rkanade@redhat.com>
3604df
3604df
Change-Id: I7e60629fb8003c620847fa63441f6b098db59721
3604df
BUG: 1397257
3604df
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
3604df
Reviewed-on: https://code.engineering.redhat.com/gerrit/90858
3604df
---
3604df
 xlators/mgmt/glusterd/src/glusterd-handler.c | 8 ++++++--
3604df
 1 file changed, 6 insertions(+), 2 deletions(-)
3604df
3604df
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
3604df
index 417c300..b9270d8 100644
3604df
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
3604df
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
3604df
@@ -4949,7 +4949,7 @@ glusterd_handle_get_vol_opt (rpcsvc_request_t *req)
3604df
 }
3604df
 
3604df
 static int
3604df
-glusterd_print_global_options (dict_t *opts, char *key, data_t *val, void *data)
3604df
+glusterd_print_dict_options (dict_t *opts, char *key, data_t *val, void *data)
3604df
 {
3604df
         FILE *fp = NULL;
3604df
 
3604df
@@ -5129,7 +5129,7 @@ glusterd_get_state (rpcsvc_request_t *req, dict_t *dict)
3604df
         fprintf (fp, "\n[Global options]\n");
3604df
 
3604df
         if (priv->opts)
3604df
-                dict_foreach (priv->opts, glusterd_print_global_options, fp);
3604df
+                dict_foreach (priv->opts, glusterd_print_dict_options, fp);
3604df
 
3604df
         rcu_read_lock ();
3604df
         fprintf (fp, "\n[Peers]\n");
3604df
@@ -5352,6 +5352,10 @@ glusterd_get_state (rpcsvc_request_t *req, dict_t *dict)
3604df
                                  volinfo->rep_brick.dst_brick->hostname,
3604df
                                  volinfo->rep_brick.dst_brick->path);
3604df
                 }
3604df
+                fprintf (fp, "[Volume%d.options]\n", count);
3604df
+                if (volinfo->dict)
3604df
+                        dict_foreach (volinfo->dict,
3604df
+                                      glusterd_print_dict_options, fp);
3604df
 
3604df
                 fprintf (fp, "\n");
3604df
         }
3604df
-- 
3604df
2.9.3
3604df