diff options
author | Poornima G <pgurusid@redhat.com> | 2016-06-29 00:25:39 -0400 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2016-07-05 04:00:50 -0700 |
commit | 01d6b17bac704a320bc0549ae063ee7f4bf3748b (patch) | |
tree | 370fae2fccff9d490af559d6debc2aa129bd11f9 /xlators | |
parent | 633e6fe265bc2de42dade58dc6a15c285957da76 (diff) |
md-cache: Cache gluster-samba metadata
Change-Id: I0a95f4897440c5bf6f54612d9c232e015c8bf983
BUG: 1211863
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/14824
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-set.c | 9 | ||||
-rw-r--r-- | xlators/performance/md-cache/src/md-cache.c | 30 |
2 files changed, 38 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 9202763691c..31273fb5cea 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -1586,7 +1586,14 @@ struct volopt_map_entry glusterd_volopt_map[] = { .description = "Cache swift metadata (user.swift.metadata xattr)", .flags = OPT_FLAG_CLIENT_OPT }, - + { .key = "performance.cache-samba-metadata", + .voltype = "performance/md-cache", + .option = "cache-samba-metadata", + .op_version = GD_OP_VERSION_3_9_0, + .description = "Cache samba metadata (user.DOSATTRIB, security.NTACL" + " xattr)", + .flags = OPT_FLAG_CLIENT_OPT + }, /* Crypt xlator options */ diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c index 31bc8d8187d..c1aef210e1d 100644 --- a/xlators/performance/md-cache/src/md-cache.c +++ b/xlators/performance/md-cache/src/md-cache.c @@ -33,6 +33,7 @@ struct mdc_conf { gf_boolean_t cache_selinux; gf_boolean_t force_readdirp; gf_boolean_t cache_swift_metadata; + gf_boolean_t cache_samba_metadata; }; @@ -71,6 +72,16 @@ static struct mdc_key { .load = 0, .check = 1, }, + { + .name = "user.DOSATTRIB", + .load = 0, + .check = 1, + }, + { + .name = "security.NTACL", + .load = 0, + .check = 1, + }, { .name = "security.capability", .load = 0, @@ -2314,6 +2325,12 @@ reconfigure (xlator_t *this, dict_t *options) mdc_key_load_set (mdc_keys, "user.swift.metadata", conf->cache_swift_metadata); + GF_OPTION_RECONF ("cache-samba-metadata", conf->cache_samba_metadata, + options, bool, out); + mdc_key_load_set (mdc_keys, "user.DOSATTRIB", + conf->cache_samba_metadata); + mdc_key_load_set (mdc_keys, "security.NTACL", + conf->cache_samba_metadata); GF_OPTION_RECONF("force-readdirp", conf->force_readdirp, options, bool, out); @@ -2356,6 +2373,13 @@ init (xlator_t *this) mdc_key_load_set (mdc_keys, "user.swift.metadata", conf->cache_swift_metadata); + GF_OPTION_INIT ("cache-samba-metadata", conf->cache_samba_metadata, + bool, out); + mdc_key_load_set (mdc_keys, "user.DOSATTRIB", + conf->cache_samba_metadata); + mdc_key_load_set (mdc_keys, "security.NTACL", + conf->cache_samba_metadata); + GF_OPTION_INIT("force-readdirp", conf->force_readdirp, bool, out); out: this->private = conf; @@ -2419,6 +2443,12 @@ struct volume_options options[] = { .default_value = "true", .description = "Cache swift metadata (user.swift.metadata xattr)", }, + { .key = {"cache-samba-metadata"}, + .type = GF_OPTION_TYPE_BOOL, + .default_value = "false", + .description = "Cache samba metadata (user.DOSATTRIB, security.NTACL" + " xattrs)", + }, { .key = {"cache-posix-acl"}, .type = GF_OPTION_TYPE_BOOL, .default_value = "false", |