Commit 8ae4f4f5 authored by Alex Elder's avatar Alex Elder Committed by Sage Weil

libceph: have cursor point to data

Rather than having a ceph message data item point to the cursor it's
associated with, have the cursor point to a data item.  This will
allow a message cursor to be used for more than one data item.
Signed-off-by: default avatarAlex Elder <elder@inktank.com>
Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
parent 36153ec9
...@@ -104,13 +104,13 @@ struct ceph_msg_data { ...@@ -104,13 +104,13 @@ struct ceph_msg_data {
}; };
struct ceph_pagelist *pagelist; struct ceph_pagelist *pagelist;
}; };
struct ceph_msg_data_cursor *cursor;
}; };
struct ceph_msg_data_cursor { struct ceph_msg_data_cursor {
struct ceph_msg_data *data; /* data item this describes */
size_t resid; /* bytes not yet consumed */ size_t resid; /* bytes not yet consumed */
bool last_piece; /* now at last piece of data item */ bool last_piece; /* current is last piece */
bool need_crc; /* new piece; crc update needed */ bool need_crc; /* crc update needed */
union { union {
#ifdef CONFIG_BLOCK #ifdef CONFIG_BLOCK
struct { /* bio */ struct { /* bio */
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment