summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2018-04-23 04:44:40 -0400
committerAmar Tumballi <amarts@redhat.com>2018-05-06 07:09:18 +0530
commit99cba93daadd29967d26621d1deee842d94483a8 (patch)
treed8c376d5618e9a261688df53445211249e7c3fd0 /xlators
parent487aaafacac8af16c08eb44fe9bf178768d372fa (diff)
glusterd/utime: glusterd utime changes
Load utime xlator in the client side just after (below) performance xlators. Updates: #208 Change-Id: Ie15f156943fa8e7dac7050e5479c906da747b568 Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c12
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c9
2 files changed, 21 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index d1d9ac6b8ea..daf69f90cc0 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -4500,6 +4500,18 @@ client_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
}
}
+ ret = dict_get_str_boolean (set_dict, "features.utime", _gf_false);
+ if (ret == -1)
+ goto out;
+
+ if (ret) {
+ xl = volgen_graph_add (graph, "features/utime", volname);
+ if (!xl) {
+ ret = -1;
+ goto out;
+ }
+ }
+
/* As of now snapshot volume is read-only. Read-only xlator is loaded
* in client graph so that AFR & DHT healing can be done in server.
*/
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index 25640073b5c..d603d1bd93e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -3807,6 +3807,15 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.op_version = GD_OP_VERSION_4_1_0,
.flags = VOLOPT_FLAG_CLIENT_OPT
},
+ { .key = "features.utime",
+ .voltype = "features/utime",
+ .validate_fn = validate_boolean,
+ .value = "off",
+ .option = "!utime",
+ .op_version = GD_OP_VERSION_4_1_0,
+ .description = "enable/disable utime translator on the volume.",
+ .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT
+ },
{ .key = NULL
}
};