From a6a2e3a86c0d4c0873e822a38769677df2050f11 Mon Sep 17 00:00:00 2001 From: Kaushik BV Date: Thu, 12 Aug 2010 01:57:04 +0000 Subject: log added in case of invalid options provided for the io-threads volume Signed-off-by: Kaushik BV Signed-off-by: Anand V. Avati BUG: 1033 (io-threads doesn't log its options) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1033 --- xlators/performance/io-threads/src/io-threads.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'xlators/performance') diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c index 0328d74119c..3e65306ced1 100644 --- a/xlators/performance/io-threads/src/io-threads.c +++ b/xlators/performance/io-threads/src/io-threads.c @@ -2113,11 +2113,18 @@ init (xlator_t *this) if (dict_get (options, "thread-count")) { thread_count = data_to_int32 (dict_get (options, "thread-count")); - if (thread_count < IOT_MIN_THREADS) + if (thread_count < IOT_MIN_THREADS) { + gf_log ("io-threads", GF_LOG_WARNING, + "Number of threads opted is less then min" + "threads allowed scaling it up to min"); thread_count = IOT_MIN_THREADS; - - if (thread_count > IOT_MAX_THREADS) + } + if (thread_count > IOT_MAX_THREADS) { + gf_log ("io-threads", GF_LOG_WARNING, + "Number of threads opted is more then max" + " threads allowed scaling it down to max"); thread_count = IOT_MAX_THREADS; + } } conf->max_count = thread_count; -- cgit