diff options
author | Kaushik BV <kaushikbv@gluster.com> | 2011-08-18 00:55:28 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-08-18 23:14:41 -0700 |
commit | 2f53b7857c66a99f5dc626aa2acb99edf5b2e9f4 (patch) | |
tree | 7694201e1b113d89411ea1657f983217b8fb36ec /xlators/mgmt/glusterd/src | |
parent | ce0aaba383b97dca52d11c18846a8154d529bf8a (diff) |
mgmt/glusterd: call the nfs option handler at the right placev3.2.3qa3
Change-Id: If2b854ede47fa27c0134e6abaccb62dbe2ea8b26
BUG: 3414
Reviewed-on: http://review.gluster.com/255
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 2551d5f222e..2fe18294193 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -2090,6 +2090,13 @@ nfs_option_handler (volgen_graph_t *graph, return -1; } + if ( (strcmp (vme->voltype, "nfs/server") == 0) && + (vme->option && vme->option[0]!='!') ) { + ret = xlator_set_option (xl, vme->option, vme->value); + if (ret) + return -1; + } + /*key = strchr (vme->key, '.') + 1; @@ -2107,18 +2114,6 @@ nfs_option_handler (volgen_graph_t *graph, return 0; } -static int -nfs_spec_option_handler (volgen_graph_t *graph, - struct volopt_map_entry *vme, void *param) -{ - int ret = 0; - - ret = nfs_option_handler (graph, vme, param); - if (!ret) - return basic_option_handler (graph, vme, NULL); - return ret; -} - /* builds a graph for nfs server role, with option overrides in mod_dict */ static int build_nfs_graph (volgen_graph_t *graph, dict_t *mod_dict) @@ -2207,10 +2202,10 @@ build_nfs_graph (volgen_graph_t *graph, dict_t *mod_dict) if (mod_dict) { dict_copy (mod_dict, set_dict); ret = volgen_graph_set_options_generic (&cgraph, set_dict, voliter, - nfs_spec_option_handler); + basic_option_handler); } else { ret = volgen_graph_set_options_generic (&cgraph, voliter->dict, voliter, - nfs_spec_option_handler); + basic_option_handler); } ret = volgen_graph_merge_sub (graph, &cgraph); @@ -2218,7 +2213,24 @@ build_nfs_graph (volgen_graph_t *graph, dict_t *mod_dict) goto out; } + list_for_each_entry (voliter, &priv->volumes, vol_list) { + + if (mod_dict) { + dict_copy (mod_dict, set_dict); + ret = volgen_graph_set_options_generic (graph, set_dict, voliter, + nfs_option_handler); + } else { + ret = volgen_graph_set_options_generic (graph, voliter->dict, voliter, + nfs_option_handler); + } + + if (ret) + gf_log ("glusterd", GF_LOG_WARNING, "Could not set " + "vol-options for the volume %s", voliter->volname); + } + out: + gf_log ("glusterd", GF_LOG_DEBUG, "Returning %d", ret); dict_destroy (set_dict); return ret; |