summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2018-10-15 15:41:23 +0800
committerRaghavendra G <rgowdapp@redhat.com>2018-11-06 10:17:50 +0000
commit9777662406319422450989db104d5a588e52104d (patch)
treea026a00413f0b0abb885dc0a6568debad66dd6e3 /xlators/performance
parent5f19d8231cedf72af554d6f5e9c2636b1586ec16 (diff)
md-cache: new option "cache-glusterfs-acl" for virtual glusterfs ACLs
Change-Id: I020ab08dba48f13cf7b8908e96280f1e92e9b9db Updates: bz#1634220 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
Diffstat (limited to 'xlators/performance')
-rw-r--r--xlators/performance/md-cache/src/md-cache.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c
index 3cd84c5df8c..3480a90b99b 100644
--- a/xlators/performance/md-cache/src/md-cache.c
+++ b/xlators/performance/md-cache/src/md-cache.c
@@ -63,6 +63,7 @@ struct mdc_statistics {
struct mdc_conf {
int timeout;
gf_boolean_t cache_posix_acl;
+ gf_boolean_t cache_glusterfs_acl;
gf_boolean_t cache_selinux;
gf_boolean_t cache_capability;
gf_boolean_t cache_ima;
@@ -3208,9 +3209,11 @@ mdc_xattr_list_populate(struct mdc_conf *conf, char *tmp_str)
strcat(mdc_xattr_str, "security.ima,");
if (conf->cache_posix_acl)
- strcat(mdc_xattr_str, POSIX_ACL_ACCESS_XATTR
- "," POSIX_ACL_DEFAULT_XATTR "," GF_POSIX_ACL_ACCESS
- "," GF_POSIX_ACL_DEFAULT ",");
+ strcat(mdc_xattr_str,
+ POSIX_ACL_ACCESS_XATTR "," POSIX_ACL_DEFAULT_XATTR ",");
+
+ if (conf->cache_glusterfs_acl)
+ strcat(mdc_xattr_str, GF_POSIX_ACL_ACCESS "," GF_POSIX_ACL_DEFAULT ",");
if (conf->cache_swift_metadata)
strcat(mdc_xattr_str, "user.swift.metadata,");
@@ -3471,6 +3474,9 @@ mdc_reconfigure(xlator_t *this, dict_t *options)
GF_OPTION_RECONF("cache-posix-acl", conf->cache_posix_acl, options, bool,
out);
+ GF_OPTION_RECONF("cache-glusterfs-acl", conf->cache_glusterfs_acl, options,
+ bool, out);
+
GF_OPTION_RECONF("cache-swift-metadata", conf->cache_swift_metadata,
options, bool, out);
@@ -3542,6 +3548,8 @@ mdc_init(xlator_t *this)
GF_OPTION_INIT("cache-posix-acl", conf->cache_posix_acl, bool, out);
+ GF_OPTION_INIT("cache-glusterfs-acl", conf->cache_glusterfs_acl, bool, out);
+
GF_OPTION_INIT("cache-swift-metadata", conf->cache_swift_metadata, bool,
out);
@@ -3743,6 +3751,16 @@ struct volume_options mdc_options[] = {
"system.posix_acl_default) on client side",
},
{
+ .key = {"cache-glusterfs-acl"},
+ .type = GF_OPTION_TYPE_BOOL,
+ .default_value = "false",
+ .op_version = {GD_OP_VERSION_6_0},
+ .flags = OPT_FLAG_SETTABLE | OPT_FLAG_CLIENT_OPT | OPT_FLAG_DOC,
+ .description = "Cache virtual glusterfs ACL xattrs "
+ "(glusterfs.posix.acl, glusterfs.posix.default_acl) "
+ "on client side",
+ },
+ {
.key = {"md-cache-timeout"},
.type = GF_OPTION_TYPE_INT,
.min = 0,