summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-common.c
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2018-05-05 00:05:09 -0400
committerAmar Tumballi <amarts@redhat.com>2018-05-06 07:09:19 +0530
commit17e3f617086da785a3678d7cfa8f68ebd1497023 (patch)
tree8694053a2076c9445b113ff48c57ffb4578b2ef0 /xlators/storage/posix/src/posix-common.c
parent99cba93daadd29967d26621d1deee842d94483a8 (diff)
glusterd/ctime: Provide option to enable/disable ctime feature
Updates: #208 Change-Id: If6f52b9b1b5b823ad64faeed662e96ceb848c54c Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix-common.c')
-rw-r--r--xlators/storage/posix/src/posix-common.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-common.c b/xlators/storage/posix/src/posix-common.c
index bcaad2703e9..c17534536d2 100644
--- a/xlators/storage/posix/src/posix-common.c
+++ b/xlators/storage/posix/src/posix-common.c
@@ -390,6 +390,9 @@ posix_reconfigure (xlator_t *this, dict_t *options)
GF_OPTION_RECONF ("fips-mode-rchecksum", priv->fips_mode_rchecksum,
options, bool, out);
+
+ GF_OPTION_RECONF ("ctime", priv->ctime, options, bool, out);
+
ret = 0;
out:
return ret;
@@ -1082,6 +1085,8 @@ posix_init (xlator_t *this)
GF_OPTION_INIT ("fips-mode-rchecksum", _private->fips_mode_rchecksum,
bool, out);
+
+ GF_OPTION_INIT ("ctime", _private->ctime, bool, out);
out:
if (ret) {
if (_private) {
@@ -1383,5 +1388,16 @@ struct volume_options options[] = {
.description = "If enabled, posix_rchecksum uses the FIPS compliant"
"SHA256 checksum. MD5 otherwise."
},
+ { .key = {"ctime"},
+ .type = GF_OPTION_TYPE_BOOL,
+ .default_value = "off",
+ .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC,
+ .op_version = { GD_OP_VERSION_4_1_0 },
+ .tags = { "ctime" },
+ .description = "When this option is enabled, time attributes (ctime,mtime,atime) "
+ "are stored in xattr to keep it consistent across replica and "
+ "distribute set. The time attributes stored at the backend are "
+ "not considered "
+ },
{ .key = {NULL} }
};