diff options
-rw-r--r-- | libglusterfs/src/options.h | 1 | ||||
-rw-r--r-- | xlators/features/quota/src/quota.c | 16 |
2 files changed, 9 insertions, 8 deletions
diff --git a/libglusterfs/src/options.h b/libglusterfs/src/options.h index 71a11c06..62f4ee92 100644 --- a/libglusterfs/src/options.h +++ b/libglusterfs/src/options.h @@ -195,6 +195,7 @@ DECLARE_RECONF_OPT(gf_boolean_t, bool); DECLARE_RECONF_OPT(xlator_t *, xlator); DECLARE_RECONF_OPT(char *, path); DECLARE_RECONF_OPT(double, double); +DECLARE_RECONF_OPT(uint32_t, time); #define DEFINE_RECONF_OPT(type_t, type, conv) \ diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 769fb880..13f5136c 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -3681,9 +3681,9 @@ init (xlator_t *this) GF_OPTION_INIT ("server-quota", priv->is_quota_on, bool, err); GF_OPTION_INIT ("default-soft-limit", priv->default_soft_lim, percent, err); - GF_OPTION_INIT ("soft-timeout", priv->soft_timeout, uint32, err); - GF_OPTION_INIT ("hard-timeout", priv->hard_timeout, uint32, err); - GF_OPTION_INIT ("alert-time", priv->log_timeout, uint32, err); + GF_OPTION_INIT ("soft-timeout", priv->soft_timeout, time, err); + GF_OPTION_INIT ("hard-timeout", priv->hard_timeout, time, err); + GF_OPTION_INIT ("alert-time", priv->log_timeout, time, err); GF_OPTION_INIT ("volume-uuid", priv->volume_uuid, str, err); this->local_pool = mem_pool_new (quota_local_t, 64); @@ -3721,11 +3721,11 @@ reconfigure (xlator_t *this, dict_t *options) GF_OPTION_RECONF ("default-soft-limit", priv->default_soft_lim, options, percent, out); GF_OPTION_RECONF ("alert-time", priv->log_timeout, options, - uint32, out); + time, out); GF_OPTION_RECONF ("soft-timeout", priv->soft_timeout, options, - uint32, out); + time, out); GF_OPTION_RECONF ("hard-timeout", priv->hard_timeout, options, - uint32, out); + time, out); ret = 0; @@ -3831,7 +3831,7 @@ struct volume_options options[] = { .max = LONG_MAX, }, {.key = {"soft-timeout"}, - .type = GF_OPTION_TYPE_INT, + .type = GF_OPTION_TYPE_TIME, .min = 0, .max = 1800, .default_value = "60", @@ -3840,7 +3840,7 @@ struct volume_options options[] = { " cache before soft-limit has been crossed." }, {.key = {"hard-timeout"}, - .type = GF_OPTION_TYPE_INT, + .type = GF_OPTION_TYPE_TIME, .min = 0, .max = 60, .default_value = "5", |