From 9b11b90d30285942113bb1e2d2a662337a75511c Mon Sep 17 00:00:00 2001 From: Ryan Ding Date: Wed, 16 Nov 2016 10:52:34 +0800 Subject: glusterd: Fix the debug and error-gen turned on issue Problem: When enabling one of the debug or the error-gen xlator, both of them will be turned on together. The problem is that when adding debug xlators into the graph, its on/off status is ignored to be checked. Fix: When adding a debug xlator, check its status and skip those with a value of "off". Change-Id: Ifa79314ff337b60ee941cfb0308c1ccbe42d027f BUG: 1395492 Signed-off-by: Zhang Huan Reviewed-on: https://review.gluster.org/15849 Tested-by: Atin Mukherjee Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Atin Mukherjee --- xlators/mgmt/glusterd/src/glusterd-volgen.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xlators') diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index d82e0f1ae86..410885e82de 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -2554,6 +2554,8 @@ debugxl_option_handler (volgen_graph_t *graph, struct volopt_map_entry *vme, return 0; add_graph: + if (strcmp (vme->value, "off") == 0) + return 0; if (volgen_graph_add (graph, vme->voltype, volname)) return 0; else -- cgit