summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
authorPrashanth Pai <ppai@redhat.com>2016-03-15 14:21:18 +0530
committerKaushal M <kaushal@redhat.com>2016-03-31 00:48:53 -0700
commit116419f3cb7b5711b0881428c2deda829b43e782 (patch)
treeeff33e63d0d3c342c1b65dfbf80e8f42183d4f87 /xlators/performance
parent9e6a9199b1dbd58e558d69f6c92ff6b948d3b7b3 (diff)
md-cache: Cache gluster-swift metadata
> BUG: 1317785 > Change-Id: Ie02b8fc294802f8fdf49dee8bf97f1e6177d92bd > Signed-off-by: Prashanth Pai <ppai@redhat.com> > Reviewed-on: http://review.gluster.org/13735 > Smoke: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Poornima G <pgurusid@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Niels de Vos <ndevos@redhat.com> > Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> BUG: 1317788 Change-Id: I86efca6a829cdda70ec7ed7fe0a16b73c25888c3 Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/13753 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/performance')
-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 d07e768628d..b94dade5ebc 100644
--- a/xlators/performance/md-cache/src/md-cache.c
+++ b/xlators/performance/md-cache/src/md-cache.c
@@ -36,6 +36,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;
};
@@ -69,6 +70,11 @@ static struct mdc_key {
.load = 0,
.check = 1,
},
+ {
+ .name = "user.swift.metadata",
+ .load = 0,
+ .check = 1,
+ },
{
.name = "security.capability",
.load = 0,
@@ -2229,6 +2235,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:
@@ -2265,6 +2277,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;
@@ -2322,6 +2339,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",