summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2013-09-02 22:43:04 -0700
committerGerrit Code Review <review@dev.gluster.org>2013-09-02 22:43:04 -0700
commit5aeeda7d7727769f60965305c1974a2c84bc6177 (patch)
treeb87fb80b548cc66a1486e5c55839d0f466dfc1f6
parenta9d361e80106a4913d141e90b02a17dfc4290d1c (diff)
parent75937b83d6b36f00a20688f1348aa6db30171784 (diff)
Merge "features/quota: Read the time option in its native format" into upstream_on_quota
-rw-r--r--libglusterfs/src/options.h1
-rw-r--r--xlators/features/quota/src/quota.c16
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",