summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec
diff options
context:
space:
mode:
authorAshish Pandey <aspandey@redhat.com>2015-07-08 12:42:50 +0530
committerXavier Hernandez <xhernandez@datalab.es>2015-07-14 00:07:46 -0700
commitc4009f895818a84ed4c3bb8f826e78d17a6a5b3e (patch)
treea5399f802a3c0d02906352f8c00989665ae11ca8 /xlators/cluster/ec
parent8c39f1487461fb366e6156955f5045ee9f71c1a9 (diff)
ec : Implement check for the cluster.heal-timeout values
for disperse volume. Problem : User can set wrong values for cluster.heal-timeout using cli. Any value like string, negative numbers or 0 could be set. Solution : Check the value given by user. It should be numerical, non negative and within the range. Change-Id: I5184ef1a11bb2c225f42ac9ccb1ba680a86cfe09 BUG: 1239037 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/11573 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Diffstat (limited to 'xlators/cluster/ec')
-rw-r--r--xlators/cluster/ec/src/ec.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c
index e28f402e6fe..72dc919ded5 100644
--- a/xlators/cluster/ec/src/ec.c
+++ b/xlators/cluster/ec/src/ec.c
@@ -246,6 +246,8 @@ reconfigure (xlator_t *this, dict_t *options)
uint32, failed);
GF_OPTION_RECONF ("heal-wait-qlength", heal_wait_qlen, options,
uint32, failed);
+ GF_OPTION_RECONF ("heal-timeout", ec->shd.timeout, options,
+ int32, failed);
ec_configure_background_heal_opts (ec, background_heals,
heal_wait_qlen);
return 0;
@@ -1315,5 +1317,13 @@ struct volume_options options[] =
.description = "This option can be used to control number of heals"
" that can wait",
},
+ { .key = {"heal-timeout"},
+ .type = GF_OPTION_TYPE_INT,
+ .min = 60,
+ .max = INT_MAX,
+ .default_value = "600",
+ .description = "time interval for checking the need to self-heal "
+ "in self-heal-daemon"
+ },
{ }
};