summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2019-04-05 08:59:35 +0300
committerAtin Mukherjee <amukherj@redhat.com>2019-04-08 16:27:28 +0000
commitae097b8ad5c160aed43d82187b623f053adf11b4 (patch)
tree68f7f66362629c41dba9b94460bc8da1353bf1d8 /xlators/mgmt/glusterd
parent4bd4b0a9437189cef439833a0ed70005db9f8409 (diff)
glusterd-volgen.c: skip fetching skip-CLIOT in a loop.
Its value is not going to change within the loop, as far as I can understand the code. Fetch and store it outside the loop. Change-Id: I6327c23212dceec6006349421ef185495892dd8a updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 621ca49ebe6..08b80fcf142 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -506,6 +506,7 @@ volgen_graph_set_options_generic(volgen_graph_t *graph, dict_t *dict,
0,
};
data_t *data = NULL;
+ const int skip_cliot = dict_get_str_boolean(dict, "skip-CLIOT", _gf_false);
odt.graph = graph;
odt.handler = handler;
@@ -518,8 +519,8 @@ volgen_graph_set_options_generic(volgen_graph_t *graph, dict_t *dict,
odt.data_t_fake = _gf_false;
data = dict_get(dict, vme->key);
- if (!strcmp(vme->key, "performance.client-io-threads") &&
- dict_get_str_boolean(dict, "skip-CLIOT", _gf_false) == _gf_true) {
+ if (skip_cliot == _gf_true &&
+ !strcmp(vme->key, "performance.client-io-threads")) {
continue;
}