summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 148cea9c..da227759 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -2759,60 +2759,6 @@ nfs_option_handler (volgen_graph_t *graph,
}
static int
-set_quotad_xlator_option (char *fmt_str, char *opt_name, char *volname,
- xlator_t *xl, char *value)
-{
- int ret = -1;
- char *opt_str = NULL;
-
- ret = gf_asprintf (&opt_str, fmt_str, volname, opt_name);
- if (opt_str == NULL) {
- ret = -1;
- goto out;
- }
- ret = xlator_set_option (xl, opt_str, value);
-
-out:
- GF_FREE (opt_str);
- return ret;
-}
-
-int
-quotad_option_handler (volgen_graph_t *graph, struct volopt_map_entry *vme,
- void *param)
-{
- xlator_t *xl = NULL;
- char *opt_str = NULL;
- int ret = 0;
- glusterd_volinfo_t *volinfo = NULL;
- int i = 0;
- char *ptr = NULL;
- char *options[] = {"!*.soft-timeout", "!*.hard-timeout",
- "limit-set", "!*.alert-time",
- "default-soft-limit", NULL};
-
- volinfo = param;
- xl = first_of (graph);
-
- for (i = 0; options[i]; i++) {
- if (!strcmp (vme->option, options[i])) {
- ptr = strchr (options[i], '.');
- if (!ptr)
- opt_str = options[i];
- else
- opt_str = ptr + 1;
- ret = set_quotad_xlator_option ("%s.%s", opt_str,
- volinfo->volname, xl,
- vme->value);
- if (ret)
- return -1;
- }
- }
-
- return 0;
-}
-
-static int
volgen_graph_set_iam_shd (volgen_graph_t *graph)
{
xlator_t *trav;
@@ -3261,26 +3207,6 @@ build_quotad_graph (volgen_graph_t *graph, dict_t *mod_dict)
goto out;
}
- list_for_each_entry (voliter, &priv->volumes, vol_list) {
- if (voliter->status != GLUSTERD_STATUS_STARTED)
- continue;
-
- if (1 != glusterd_is_volume_quota_enabled (voliter))
- continue;
- if (mod_dict) {
- ret = volgen_graph_set_options_generic (graph, mod_dict,
- voliter,
- quotad_option_handler);
- } else {
- ret = volgen_graph_set_options_generic (graph,
- voliter->dict, voliter,
- quotad_option_handler);
- }
-
- if (ret)
- gf_log (THIS->name, GF_LOG_ERROR, "Failed to set "
- "options for the volume %s", voliter->volname);
- }
out:
if (set_dict)
dict_unref (set_dict);