summaryrefslogtreecommitdiffstats
path: root/xlators/performance/md-cache/src/md-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance/md-cache/src/md-cache.c')
-rw-r--r--xlators/performance/md-cache/src/md-cache.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c
index 59af907a1e7..b761eae4975 100644
--- a/xlators/performance/md-cache/src/md-cache.c
+++ b/xlators/performance/md-cache/src/md-cache.c
@@ -31,6 +31,7 @@ struct mdc_conf {
gf_boolean_t cache_posix_acl;
gf_boolean_t cache_selinux;
gf_boolean_t force_readdirp;
+ gf_boolean_t cache_swift_metadata;
};
@@ -64,6 +65,11 @@ static struct mdc_key {
.load = 0,
.check = 1,
},
+ {
+ .name = "user.swift.metadata",
+ .load = 0,
+ .check = 1,
+ },
{
.name = "security.capability",
.load = 0,
@@ -2224,6 +2230,12 @@ reconfigure (xlator_t *this, dict_t *options)
mdc_key_load_set (mdc_keys, "system.posix_acl_", conf->cache_posix_acl);
mdc_key_load_set (mdc_keys, "glusterfs.posix_acl.", conf->cache_posix_acl);
+ GF_OPTION_RECONF ("cache-swift-metadata", conf->cache_swift_metadata,
+ options, bool, out);
+ mdc_key_load_set (mdc_keys, "user.swift.metadata",
+ conf->cache_swift_metadata);
+
+
GF_OPTION_RECONF("force-readdirp", conf->force_readdirp, options, bool, out);
out:
@@ -2260,6 +2272,11 @@ init (xlator_t *this)
mdc_key_load_set (mdc_keys, "system.posix_acl_", conf->cache_posix_acl);
mdc_key_load_set (mdc_keys, "glusterfs.posix_acl.", conf->cache_posix_acl);
+ GF_OPTION_INIT ("cache-swift-metadata",
+ conf->cache_swift_metadata, bool, out);
+ mdc_key_load_set (mdc_keys, "user.swift.metadata",
+ conf->cache_swift_metadata);
+
GF_OPTION_INIT("force-readdirp", conf->force_readdirp, bool, out);
out:
this->private = conf;
@@ -2317,6 +2334,11 @@ struct volume_options options[] = {
.type = GF_OPTION_TYPE_BOOL,
.default_value = "false",
},
+ { .key = {"cache-swift-metadata"},
+ .type = GF_OPTION_TYPE_BOOL,
+ .default_value = "true",
+ .description = "Cache swift metadata (user.swift.metadata xattr)",
+ },
{ .key = {"cache-posix-acl"},
.type = GF_OPTION_TYPE_BOOL,
.default_value = "false",