mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
libceph: drop last_piece flag from ceph_msg_data_cursor
ceph_msg_data_next is always passed a NULL pointer for this field. Some of the "next" operations look at it in order to determine the length, but we can just take the min of the data on the page or cursor->resid. Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
committed by
Ilya Dryomov
parent
4fe89d07dc
commit
da4ab869e3
@@ -207,7 +207,6 @@ struct ceph_msg_data_cursor {
|
||||
|
||||
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 */
|
||||
union {
|
||||
#ifdef CONFIG_BLOCK
|
||||
@@ -498,8 +497,7 @@ void ceph_con_discard_requeued(struct ceph_connection *con, u64 reconnect_seq);
|
||||
void ceph_msg_data_cursor_init(struct ceph_msg_data_cursor *cursor,
|
||||
struct ceph_msg *msg, size_t length);
|
||||
struct page *ceph_msg_data_next(struct ceph_msg_data_cursor *cursor,
|
||||
size_t *page_offset, size_t *length,
|
||||
bool *last_piece);
|
||||
size_t *page_offset, size_t *length);
|
||||
void ceph_msg_data_advance(struct ceph_msg_data_cursor *cursor, size_t bytes);
|
||||
|
||||
u32 ceph_crc32c_page(u32 crc, struct page *page, unsigned int page_offset,
|
||||
|
||||
Reference in New Issue
Block a user