|
|
74b1de |
From c44c9f2003b703d64a2a06c53f5a2b85e9dc7a11 Mon Sep 17 00:00:00 2001
|
|
|
74b1de |
From: Kotresh HR <khiremat@redhat.com>
|
|
|
74b1de |
Date: Wed, 31 Jul 2019 09:23:42 -0400
|
|
|
74b1de |
Subject: [PATCH 262/262] glusterd/ctime: Disable ctime by default
|
|
|
74b1de |
|
|
|
74b1de |
The ctime feature, in combination with gfid2path
|
|
|
74b1de |
causes peformance dip on rename workloads. Hence
|
|
|
74b1de |
disabling the feature by default.
|
|
|
74b1de |
|
|
|
74b1de |
Change-Id: I280527eea4dc19bba39fb6a5e74760823a056dc9
|
|
|
74b1de |
Label : DOWNSTREAM ONLY
|
|
|
74b1de |
BUG: 1713890
|
|
|
74b1de |
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
74b1de |
Reviewed-on: https://code.engineering.redhat.com/gerrit/177421
|
|
|
74b1de |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
74b1de |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
74b1de |
Reviewed-by: Amar Tumballi Suryanarayan <amarts@redhat.com>
|
|
|
74b1de |
---
|
|
|
74b1de |
xlators/mgmt/glusterd/src/glusterd-volgen.c | 10 +++++++---
|
|
|
74b1de |
xlators/mgmt/glusterd/src/glusterd-volume-set.c | 2 +-
|
|
|
74b1de |
xlators/storage/posix/src/posix-common.c | 2 +-
|
|
|
74b1de |
3 files changed, 9 insertions(+), 5 deletions(-)
|
|
|
74b1de |
|
|
|
74b1de |
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
|
|
|
74b1de |
index 5e0214e..539e8a5 100644
|
|
|
74b1de |
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
|
|
|
74b1de |
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
|
|
|
74b1de |
@@ -4382,14 +4382,18 @@ client_graph_builder(volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
|
|
|
74b1de |
goto out;
|
|
|
74b1de |
}
|
|
|
74b1de |
}
|
|
|
74b1de |
- /* a. ret will be -1 if features.ctime is not set in the volinfo->dict which
|
|
|
74b1de |
- * means ctime should be loaded into the graph.
|
|
|
74b1de |
+ /* a. ret will be 0 (returned default) if features.ctime is not set
|
|
|
74b1de |
+ * in the volinfo->dict which means ctime should not be loaded into
|
|
|
74b1de |
+ * the graph. It is disabled by default.
|
|
|
74b1de |
* b. ret will be 1 if features.ctime is explicitly turned on through
|
|
|
74b1de |
* volume set and in that case ctime should be loaded into the graph.
|
|
|
74b1de |
* c. ret will be 0 if features.ctime is explicitly turned off and in that
|
|
|
74b1de |
* case ctime shouldn't be loaded into the graph.
|
|
|
74b1de |
*/
|
|
|
74b1de |
- ret = dict_get_str_boolean(set_dict, "features.ctime", -1);
|
|
|
74b1de |
+ ret = dict_get_str_boolean(set_dict, "features.ctime", 0);
|
|
|
74b1de |
+ if (ret == -1)
|
|
|
74b1de |
+ goto out;
|
|
|
74b1de |
+
|
|
|
74b1de |
if (conf->op_version >= GD_OP_VERSION_5_0 && ret) {
|
|
|
74b1de |
xl = volgen_graph_add(graph, "features/utime", volname);
|
|
|
74b1de |
if (!xl) {
|
|
|
74b1de |
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
|
|
|
74b1de |
index 7a83124..8ce338e 100644
|
|
|
74b1de |
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
|
|
|
74b1de |
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
|
|
|
74b1de |
@@ -3680,7 +3680,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
|
|
|
74b1de |
{.key = "features.ctime",
|
|
|
74b1de |
.voltype = "features/utime",
|
|
|
74b1de |
.validate_fn = validate_boolean,
|
|
|
74b1de |
- .value = "on",
|
|
|
74b1de |
+ .value = "off",
|
|
|
74b1de |
.option = "!utime",
|
|
|
74b1de |
.op_version = GD_OP_VERSION_4_1_0,
|
|
|
74b1de |
.description = "enable/disable utime translator on the volume.",
|
|
|
74b1de |
diff --git a/xlators/storage/posix/src/posix-common.c b/xlators/storage/posix/src/posix-common.c
|
|
|
74b1de |
index bfe2cb0..d738692 100644
|
|
|
74b1de |
--- a/xlators/storage/posix/src/posix-common.c
|
|
|
74b1de |
+++ b/xlators/storage/posix/src/posix-common.c
|
|
|
74b1de |
@@ -1374,7 +1374,7 @@ struct volume_options posix_options[] = {
|
|
|
74b1de |
"SHA256 checksum. MD5 otherwise."},
|
|
|
74b1de |
{.key = {"ctime"},
|
|
|
74b1de |
.type = GF_OPTION_TYPE_BOOL,
|
|
|
74b1de |
- .default_value = "on",
|
|
|
74b1de |
+ .default_value = "off",
|
|
|
74b1de |
.flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC,
|
|
|
74b1de |
.op_version = {GD_OP_VERSION_4_1_0},
|
|
|
74b1de |
.tags = {"ctime"},
|
|
|
74b1de |
--
|
|
|
74b1de |
1.8.3.1
|
|
|
74b1de |
|