summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-hooks.c9
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c28
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c10
3 files changed, 46 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-hooks.c b/xlators/mgmt/glusterd/src/glusterd-hooks.c
index 78730a5645f..a845f540afa 100644
--- a/xlators/mgmt/glusterd/src/glusterd-hooks.c
+++ b/xlators/mgmt/glusterd/src/glusterd-hooks.c
@@ -46,7 +46,7 @@ char glusterd_hook_dirnames[GD_OP_MAX][256] =
[GD_OP_REMOVE_BRICK] = "remove-brick",
[GD_OP_REPLACE_BRICK] = EMPTY,
[GD_OP_SET_VOLUME] = "set",
- [GD_OP_RESET_VOLUME] = EMPTY,
+ [GD_OP_RESET_VOLUME] = "reset",
[GD_OP_SYNC_VOLUME] = EMPTY,
[GD_OP_LOG_ROTATE] = EMPTY,
[GD_OP_GSYNC_CREATE] = "gsync-create",
@@ -277,6 +277,13 @@ glusterd_hooks_add_op_args (runner_t *runner, glusterd_op_t op,
glusterd_hooks_add_hooks_version (runner);
glusterd_hooks_add_op (runner, "add-brick");
glusterd_hooks_add_working_dir (runner, priv);
+ break;
+
+ case GD_OP_RESET_VOLUME:
+ glusterd_hooks_add_hooks_version (runner);
+ glusterd_hooks_add_op (runner, "reset");
+ glusterd_hooks_add_working_dir (runner, priv);
+ break;
default:
break;
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index ecc8f7cafe6..82ff8826843 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -3057,6 +3057,34 @@ nfs_option_handler (volgen_graph_t *graph,
return -1;
}
+ if (! strcmp (vme->option, "!nfs-ganesha.enable")) {
+ ret = gf_asprintf (&aa, "nfs-ganesha.%s.enable",
+ volinfo->volname);
+
+ if (ret != -1) {
+ ret = xlator_set_option (xl, aa, vme->value);
+ GF_FREE (aa);
+ }
+
+ if (ret)
+ return -1;
+ }
+
+ if (! strcmp (vme->option, "!nfs-ganesha.host")) {
+ ret = gf_asprintf (&aa, "nfs-ganesha.%s.host",
+ volinfo->volname);
+
+ if (ret != -1) {
+ ret = xlator_set_option (xl, aa, vme->value);
+ GF_FREE (aa);
+ }
+
+ if (ret)
+ return -1;
+ }
+
+
+
if ( (strcmp (vme->voltype, "nfs/server") == 0) &&
(vme->option && vme->option[0]!='!') ) {
ret = xlator_set_option (xl, vme->option, vme->value);
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index 8998d8478d0..b8eb8a56582 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -1392,6 +1392,16 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.option = "!nfs-disable",
.op_version = 1
},
+ { .key = "nfs-ganesha.enable",
+ .voltype = "nfs/server",
+ .option = "!nfs-ganesha.enable",
+ .op_version = 4
+ },
+ { .key = "nfs-ganesha.host",
+ .voltype = "nfs/server",
+ .option = "!nfs-ganesha.host",
+ .op_version = 4
+ },
{ .key = "nfs.nlm",
.voltype = "nfs/server",
.option = "nfs.nlm",