diff options
author | Varsha Rao <varao@redhat.com> | 2018-03-16 14:23:25 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-04-11 10:53:48 +0000 |
commit | 909e2cdf06fbd7b4161fff402fc6ef7b5e189c21 (patch) | |
tree | b2190d23646807254b149be54448f136dbd4e143 /xlators/performance/md-cache/src/md-cache.c | |
parent | 0002c36666c9b043a330ee08533a87fe7fd16491 (diff) |
xlators/performance: Add pass-through option
Add pass-through option in performance traslators. Set the option in
GF_OPTION_INIT() and GF_OPTION_RECONF()
Updates: #304
Change-Id: If1537450147d154905831e36f7162a32866d7ad6
Signed-off-by: Varsha Rao <varao@redhat.com>
Diffstat (limited to 'xlators/performance/md-cache/src/md-cache.c')
-rw-r--r-- | xlators/performance/md-cache/src/md-cache.c | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c index c2d44f63045..0bf97bce802 100644 --- a/xlators/performance/md-cache/src/md-cache.c +++ b/xlators/performance/md-cache/src/md-cache.c @@ -2984,16 +2984,24 @@ mdc_reconfigure (xlator_t *this, dict_t *options) GF_OPTION_RECONF ("cache-ima-xattrs", conf->cache_ima, options, bool, out); - GF_OPTION_RECONF ("cache-posix-acl", conf->cache_posix_acl, options, bool, out); + GF_OPTION_RECONF ("cache-posix-acl", conf->cache_posix_acl, options, + bool, out); + GF_OPTION_RECONF ("cache-swift-metadata", conf->cache_swift_metadata, options, bool, out); GF_OPTION_RECONF ("cache-samba-metadata", conf->cache_samba_metadata, options, bool, out); - GF_OPTION_RECONF ("force-readdirp", conf->force_readdirp, options, bool, out); + GF_OPTION_RECONF ("force-readdirp", conf->force_readdirp, options, bool, + out); + GF_OPTION_RECONF ("cache-invalidation", conf->mdc_invalidation, options, - bool, out); + bool, out); + + GF_OPTION_RECONF ("pass-through", this->pass_through, options, bool, + out); + GF_OPTION_RECONF ("md-cache-statfs", conf->cache_statfs, options, bool, out); @@ -3057,9 +3065,12 @@ mdc_init (xlator_t *this) GF_OPTION_INIT ("cache-samba-metadata", conf->cache_samba_metadata, bool, out); - GF_OPTION_INIT("force-readdirp", conf->force_readdirp, bool, out); + GF_OPTION_INIT("force-readdirp", conf->force_readdirp, bool, out); + GF_OPTION_INIT("cache-invalidation", conf->mdc_invalidation, bool, out); + GF_OPTION_INIT ("pass-through", this->pass_through, bool, out); + pthread_mutex_init (&conf->statfs_cache.lock, NULL); GF_OPTION_INIT ("md-cache-statfs", conf->cache_statfs, bool, out); @@ -3286,7 +3297,15 @@ struct volume_options mdc_options[] = { .description = "A comma separeted list of xattrs that shall be " "cached by md-cache. The only wildcard allowed is '*'", }, - { .key = {NULL} }, + { .key = {"pass-through"}, + .type = GF_OPTION_TYPE_BOOL, + .default_value = "false", + .op_version = {GD_OP_VERSION_4_1_0}, + .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC | OPT_FLAG_CLIENT_OPT, + .tags = {"md-cache"}, + .description = "Enable/Disable md cache translator" + }, + { .key = {NULL} }, }; |