Whamcloud - gitweb
- compilation fixes.
[fs/lustre-release.git] / lustre / include / linux / lustre_net.h
index 01919dd..02f5e17 100644 (file)
 
 #define CONNMGR_REQUEST_PORTAL    1
 #define CONNMGR_REPLY_PORTAL      2
-#define OSC_REQUEST_PORTAL      3
+//#define OSC_REQUEST_PORTAL      3
 #define OSC_REPLY_PORTAL        4
 #define OSC_BULK_PORTAL         5
 #define OST_REQUEST_PORTAL      6
-#define OST_REPLY_PORTAL        7
+//#define OST_REPLY_PORTAL        7
 #define OST_BULK_PORTAL         8
 #define MDC_REQUEST_PORTAL      9
 #define MDC_REPLY_PORTAL        10
@@ -54,7 +54,7 @@
 #define LDLM_CLI_REPLY_PORTAL   18
 
 /* default rpc ring length */
-#define RPC_RING_LENGTH    2
+#define RPC_RING_LENGTH    10
 
 #define SVC_KILLED 1
 #define SVC_EVENT  2
@@ -103,6 +103,7 @@ struct ptlrpc_client {
         __u32 cli_reply_portal;
         __u64 cli_last_rcvd;
         __u64 cli_last_committed;
+        __u32 cli_target_devno;
 
         void *cli_data;
         struct semaphore cli_rpc_sem; /* limits outstanding requests */
@@ -140,6 +141,7 @@ struct ptlrpc_client {
 struct ptlrpc_request { 
         int rq_type; /* one of PTL_RPC_REQUEST, PTL_RPC_REPLY, PTL_RPC_BULK */
         struct list_head rq_list;
+        struct list_head rq_multi;
         struct obd_device *rq_obd;
         int rq_status;
         int rq_flags; 
@@ -183,6 +185,8 @@ struct ptlrpc_bulk_page {
         int b_buflen;
         struct page *b_page;
         __u32 b_xid;
+        __u32 b_flags;
+        struct dentry *b_dentry;
         int (*b_cb)(struct ptlrpc_bulk_page *);
 
         ptl_md_t b_md;
@@ -193,15 +197,17 @@ struct ptlrpc_bulk_page {
 struct ptlrpc_bulk_desc {
         int b_flags;
         struct ptlrpc_connection *b_connection;
+        struct ptlrpc_client *b_client;
         __u32 b_portal;
-        int (*b_cb)(struct ptlrpc_bulk_desc *);
         struct obd_conn b_conn;
+        void (*b_cb)(struct ptlrpc_bulk_desc *, void *);
+        void *b_cb_data;
 
         wait_queue_head_t b_waitq;
         struct list_head b_page_list;
         __u32 b_page_count;
-        __u32 b_finished_count;
-        void *b_journal_info;
+        atomic_t b_pages_remaining;
+        void *b_desc_private;
 };
 
 struct ptlrpc_thread {
@@ -242,6 +248,8 @@ struct ptlrpc_service {
                            struct ptlrpc_request *req);
 };
 
+typedef void (*bulk_callback_t)(struct ptlrpc_bulk_desc *, void *);
+
 typedef int (*svc_handler_t)(struct obd_device *obddev,
                              struct ptlrpc_service *svc,
                              struct ptlrpc_request *req);
@@ -255,6 +263,7 @@ void ptlrpc_init_connection(void);
 void ptlrpc_cleanup_connection(void);
 
 /* rpc/niobuf.c */
+int ptlrpc_check_bulk_sent(struct ptlrpc_bulk_desc *bulk);
 int ptlrpc_send_bulk(struct ptlrpc_bulk_desc *);
 int ptlrpc_register_bulk(struct ptlrpc_bulk_desc *);
 int ptlrpc_abort_bulk(struct ptlrpc_bulk_desc *bulk);
@@ -296,7 +305,7 @@ ptlrpc_init_svc(__u32 bufsize, int req_portal, int rep_portal, char *uuid,
 void ptlrpc_stop_all_threads(struct ptlrpc_service *svc);
 int ptlrpc_start_thread(struct obd_device *dev, struct ptlrpc_service *svc,
                         char *name);
-int rpc_unregister_service(struct ptlrpc_service *service);
+int ptlrpc_unregister_service(struct ptlrpc_service *service);
 
 struct ptlrpc_svc_data { 
         char *name;