summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-threads
diff options
context:
space:
mode:
authorKaushik BV <kaushikbv@gluster.com>2010-09-18 03:31:56 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-18 07:02:03 -0700
commit5c297be9612f76dad6f970092fb6762b4ee4844a (patch)
treef65290e7f12e8d6913f3f3b8d3ffa8dc4cd06618 /xlators/performance/io-threads
parentfaa817ea9cb119c7f65fce24f03a172fa4b4ada1 (diff)
Glusterd: gluster volume set <volume> <option> <value>
Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1159 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1159
Diffstat (limited to 'xlators/performance/io-threads')
-rw-r--r--xlators/performance/io-threads/src/io-threads.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c
index e31bd4bba..0fe034a3f 100644
--- a/xlators/performance/io-threads/src/io-threads.c
+++ b/xlators/performance/io-threads/src/io-threads.c
@@ -2079,10 +2079,51 @@ mem_acct_init (xlator_t *this)
return ret;
}
+
+
return ret;
}
int
+reconfigure ( xlator_t *this, dict_t *options)
+{
+ iot_conf_t *conf = NULL;
+ int ret = 0;
+ int thread_count;
+
+
+ if (dict_get (options, "thread-count")) {
+ thread_count = data_to_int32 (dict_get (options,
+ "thread-count"));
+
+ if (thread_count < IOT_MIN_THREADS) {
+ gf_log ("io-threads", GF_LOG_WARNING,
+ "Number of threads opted is less then min rest"
+ "oring it to previous value",conf->max_count);
+ ret = -1;
+ goto out;
+ }
+
+ if (thread_count > IOT_MAX_THREADS) {
+ gf_log ("io-threads", GF_LOG_WARNING,
+ "Number of threads opted is greater than max "
+ "restoring it to previous value",conf->max_count);
+ ret = -1;
+ goto out;
+ }
+
+ conf->max_count = thread_count;
+ }
+
+ ret = 0;
+
+out:
+ return ret;
+
+
+}
+
+int
init (xlator_t *this)
{
iot_conf_t *conf = NULL;