libceph: replace message data pointer with list

In place of the message data pointer, use a list head which links
through message data items.  For now we only support a single entry
on that list.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
Alex Elder 2013-03-14 14:09:06 -05:00 committed by Sage Weil
commit 5240d9f95d
2 changed files with 33 additions and 16 deletions

View 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
@ -143,7 +144,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;