diff options
Diffstat (limited to 'xlators/performance/io-threads/src/io-threads.h')
| -rw-r--r-- | xlators/performance/io-threads/src/io-threads.h | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.h b/xlators/performance/io-threads/src/io-threads.h index 7606d0625..797552900 100644 --- a/xlators/performance/io-threads/src/io-threads.h +++ b/xlators/performance/io-threads/src/io-threads.h @@ -32,59 +32,39 @@ #include "dict.h" #include "xlator.h" #include "common-utils.h" +#include "list.h" #define min(a,b) ((a)<(b)?(a):(b)) #define max(a,b) ((a)>(b)?(a):(b)) struct iot_conf; struct iot_worker; -struct iot_queue; -struct iot_local; -struct iot_file; +struct iot_request; -struct iot_local { - struct iot_file *file; - size_t frame_size; -}; - -struct iot_queue { - struct iot_queue *next, *prev; +struct iot_request { + struct list_head list; /* Attaches this request to the list of + requests. + */ call_stub_t *stub; }; struct iot_worker { - struct iot_worker *next, *prev; - struct iot_queue queue; + struct list_head rqlist; /* List of requests assigned to me. */ struct iot_conf *conf; int64_t q,dq; pthread_cond_t dq_cond; pthread_mutex_t qlock; - int32_t fd_count; int32_t queue_size; pthread_t thread; }; -struct iot_file { - struct iot_file *next, *prev; /* all open files via this xlator */ - struct iot_worker *worker; - fd_t *fd; - int32_t pending_ops; -}; - 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_file files; - pthread_mutex_t files_lock; - - pthread_cond_t q_cond; + struct iot_worker ** workers; }; -typedef struct iot_file iot_file_t; typedef struct iot_conf iot_conf_t; -typedef struct iot_local iot_local_t; typedef struct iot_worker iot_worker_t; -typedef struct iot_queue iot_queue_t; +typedef struct iot_request iot_request_t; #endif /* __IOT_H */ |
