diff options
-rw-r--r-- | xlators/features/quota/src/quota.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 80d4181e5d0..2b238b2b559 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -2546,6 +2546,34 @@ quota_forget (xlator_t *this, inode_t *inode) return 0; } +int +validate_options (xlator_t *this, char **op_errstr) +{ + int ret = 0; + volume_opt_list_t *vol_opt = NULL; + volume_opt_list_t *tmp; + + if (!this) { + gf_log (this->name, GF_LOG_DEBUG, "'this' not a valid ptr"); + ret =-1; + goto out; + } + + if (list_empty (&this->volume_options)) + goto out; + + vol_opt = list_entry (this->volume_options.next, + volume_opt_list_t, list); + list_for_each_entry_safe (vol_opt, tmp, &this->volume_options, list) { + ret = validate_xlator_volume_options_attacherr (this, + vol_opt->given_opt, + op_errstr); + } + +out: + + return ret; +} int32_t quota_parse_options (quota_priv_t *priv, xlator_t *this, dict_t *options) |