summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-threads/src/io-threads.h
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-03-16 07:03:02 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-03-17 17:17:49 +0530
commit8e3e0e776cc04ad9f840383c4693ee73adc79558 (patch)
treea27c6c3d147e3994d3535bc754112f7fb4df1151 /xlators/performance/io-threads/src/io-threads.h
parent3a83fdc459a620d5ce0360bcf5fa071118d5430f (diff)
IO-threads Cleanup: Change workers list to dynamically allocated array
Worker threads were represented as a list in iot_conf_t which made us traverse the list of workers in order to decide which thread gets the request. Now we represent the workers as a dynamically allocated array so that we can just index into the array to schedule the file. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/performance/io-threads/src/io-threads.h')
-rw-r--r--xlators/performance/io-threads/src/io-threads.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.h b/xlators/performance/io-threads/src/io-threads.h
index 73a76fa8fe2..9798a09ed1d 100644
--- a/xlators/performance/io-threads/src/io-threads.h
+++ b/xlators/performance/io-threads/src/io-threads.h
@@ -56,7 +56,6 @@ struct iot_request {
};
struct iot_worker {
- struct iot_worker *next, *prev;
struct list_head rqlist; /* List of requests assigned to me. */
struct iot_conf *conf;
int64_t q,dq;
@@ -77,7 +76,7 @@ struct iot_file {
struct iot_conf {
int32_t thread_count;
int32_t misc_thread_index; /* Used to schedule the miscellaneous calls like checksum */
- struct iot_worker workers;
+ struct iot_worker ** workers;
struct iot_file files;
pthread_mutex_t files_lock;