Merge tag 'for-linus-20130509' of git://git.infradead.org/linux-mtd
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / linux / ceph / messenger.h
index 8846ff610502385751a48890cd91bfc9c2d2c8ca..7c1420bb1dcef40e6f8e4cc571ef5ea2c25df913 100644 (file)
@@ -89,6 +89,7 @@ static __inline__ bool ceph_msg_data_type_valid(enum ceph_msg_data_type type)
 }
 
 struct ceph_msg_data {
+       struct list_head                links;  /* ceph_msg->data */
        enum ceph_msg_data_type         type;
        union {
 #ifdef CONFIG_BLOCK
@@ -107,7 +108,10 @@ struct ceph_msg_data {
 };
 
 struct ceph_msg_data_cursor {
-       struct ceph_msg_data    *data;          /* data item this describes */
+       size_t                  total_resid;    /* across all data items */
+       struct list_head        *data_head;     /* = &ceph_msg->data */
+
+       struct ceph_msg_data    *data;          /* current data item */
        size_t                  resid;          /* bytes not yet consumed */
        bool                    last_piece;     /* current is last piece */
        bool                    need_crc;       /* crc update needed */
@@ -143,7 +147,7 @@ struct ceph_msg {
        struct ceph_buffer *middle;
 
        size_t                          data_length;
-       struct ceph_msg_data            *data;
+       struct list_head                data;
        struct ceph_msg_data_cursor     cursor;
 
        struct ceph_connection *con;
@@ -271,12 +275,12 @@ extern void ceph_msg_revoke_incoming(struct ceph_msg *msg);
 
 extern void ceph_con_keepalive(struct ceph_connection *con);
 
-extern void ceph_msg_data_set_pages(struct ceph_msg *msg, struct page **pages,
+extern void ceph_msg_data_add_pages(struct ceph_msg *msg, struct page **pages,
                                size_t length, size_t alignment);
-extern void ceph_msg_data_set_pagelist(struct ceph_msg *msg,
+extern void ceph_msg_data_add_pagelist(struct ceph_msg *msg,
                                struct ceph_pagelist *pagelist);
 #ifdef CONFIG_BLOCK
-extern void ceph_msg_data_set_bio(struct ceph_msg *msg, struct bio *bio,
+extern void ceph_msg_data_add_bio(struct ceph_msg *msg, struct bio *bio,
                                size_t length);
 #endif /* CONFIG_BLOCK */