From a1f129ea29250ffbb88611e460a60afac23580d4 Mon Sep 17 00:00:00 2001 From: patiencew Date: Sat, 20 Oct 2007 02:24:17 +0000 Subject: [PATCH] git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1974 29311d96-e01e-0410-9327-a35deaab8ce9 --- trunk/ceph/kernel/kmsg.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/trunk/ceph/kernel/kmsg.h b/trunk/ceph/kernel/kmsg.h index e1a12a27839b1..d292c11ea28bc 100644 --- a/trunk/ceph/kernel/kmsg.h +++ b/trunk/ceph/kernel/kmsg.h @@ -3,16 +3,20 @@ #include #include +#include #include #include "ceph_kthread.h" - -struct ceph_kthreadpool *msg_threadpool; /* thread pool */ +/* dispatch function type */ +typedef void (*ceph_kmsg_work_dispatch_t)(struct work_struct *); struct ceph_kmsgr { void *m_parent; struct radix_tree_root mpipes; /* other nodes talk to */ - struct client_thread_info cthread; /* listener thread info */ + struct ceph_client_info cthread; /* listener or select thread info */ + struct workqueue_struct *wq; /* work queue (worker threads) */ + struct work_struct *work; /* received work */ +/* note: work->func = dispatch func */ }; struct ceph_message { @@ -47,8 +51,6 @@ struct ceph_kmsg_pipe { */ extern void ceph_read_message(struct ceph_message *message); extern void ceph_write_message(struct ceph_message *message); -extern void ceph_client_dispatch(void *fs_client, struct ceph_message *message ); -extern void queue_message(struct ceph_message *message); __inline__ void ceph_put_msg(struct ceph_message *msg) { if (atomic_dec_and_test(&msg->nref)) { @@ -58,7 +60,7 @@ __inline__ void ceph_put_msg(struct ceph_message *msg) { } __inline__ void ceph_get_msg(struct ceph_message *msg) { - msg->nref++; + atomic_inc(&msg->nref); } #endif -- 2.39.5