From c25a0a58c1b20ed4d8905e6e178c7fed879057b6 Mon Sep 17 00:00:00 2001 From: patiencew Date: Tue, 16 Oct 2007 16:33:22 +0000 Subject: [PATCH] Initial version git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1949 29311d96-e01e-0410-9327-a35deaab8ce9 --- trunk/ceph/kernel/kmsg.h | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 trunk/ceph/kernel/kmsg.h diff --git a/trunk/ceph/kernel/kmsg.h b/trunk/ceph/kernel/kmsg.h new file mode 100644 index 0000000000000..250bb449e4c61 --- /dev/null +++ b/trunk/ceph/kernel/kmsg.h @@ -0,0 +1,51 @@ +#ifndef __CEPH_KMSG_H +#define __CEPH_KMSG_H + +#include +#include +#include "ceph_kthread.h" + +/* + * function prototypes + */ +void ceph_read_message(ceph_message *message ); +void ceph_write_message(ceph_message *message ); +void ceph_client_dispatch(void *fs_client, struct ceph_message *message ); +void queue_message(ceph_message *); + +struct ceph_kthreadpool *msg_threadpool; /* thread pool */ + +struct ceph_kmsgr { + void *m_parent; + struct radix_tree mpipes; /* other nodes i talk to */ + struct listener_thread_info listener_thread; /* listener thread info */ +}; + +struct ceph_message { + struct ceph_message_header *msghdr; /* header */ + struct kvec *m_iov; /* data storage */ + size_t m_iovlen; /* is this kvec.iov_len why need it in kvec? */ + struct list_head m_list_head; +}; + +struct ceph_kmsg_pipe { + int p_sd; /* socket descriptor */ + __u64 p_out_seq; /* last message sent */ + __u64 p_in_seq; /* last message received */ + + /* out queue */ + struct list_head p_out_queue; + struct ceph_message *p_out_partial; /* partially sent message */ + int p_out_partial_pos; + struct list_head p_out_sent; /* sent but unacked; may need resend if connection drops */ + + /* partially read message contents */ + struct kvec *p_in_partial_iov; /* hrm, this probably isn't what we want */ + size_t p_in_partial_iovlen; + size_t p_in_parital_iovmax; /* size of currently allocated m_iov array */ + /* .. or something like that? .. */ + +}; + +struct dispatch_queue { +}; -- 2.39.5