data_len = le32_to_cpu(msg->hdr.data_len);
BUG_ON(!data_len);
- /* initialize page iterator */
- msg_pos->page = 0;
- if (ceph_msg_has_data(msg))
- msg_pos->page_pos = msg->data.alignment;
- else
- msg_pos->page_pos = 0;
- msg_pos->data_pos = 0;
-
/* Initialize data cursor */
ceph_msg_data_cursor_init(&msg->data, data_len);
BUG_ON(!msg);
BUG_ON(!sent);
- msg_pos->data_pos += sent;
- msg_pos->page_pos += sent;
need_crc = ceph_msg_data_advance(&msg->data, sent);
BUG_ON(need_crc && sent != len);
return;
BUG_ON(sent != len);
- msg_pos->page_pos = 0;
- msg_pos->page++;
msg_pos->did_page_crc = false;
}
size_t received)
{
struct ceph_msg *msg = con->in_msg;
- struct ceph_msg_pos *msg_pos = &con->in_msg_pos;
BUG_ON(!msg);
BUG_ON(!received);
- msg_pos->data_pos += received;
- msg_pos->page_pos += received;
(void) ceph_msg_data_advance(&msg->data, received);
if (received < len)
return;
BUG_ON(received != len);
- msg_pos->page_pos = 0;
- msg_pos->page++;
}
static u32 ceph_crc32c_page(u32 crc, struct page *page,
bool do_datacrc = !con->msgr->nocrc;
int ret;
- dout("%s %p msg %p page %d offset %d\n", __func__,
- con, msg, msg_pos->page, msg_pos->page_pos);
+ dout("%s %p msg %p\n", __func__, con, msg);
if (WARN_ON(!ceph_msg_has_data(msg)))
return -EINVAL;
struct ceph_msg *msg = con->in_msg;
struct ceph_msg_data_cursor *cursor = &msg->data.cursor;
const bool do_datacrc = !con->msgr->nocrc;
- unsigned int data_len;
struct page *page;
size_t page_offset;
size_t length;
if (WARN_ON(!ceph_msg_has_data(msg)))
return -EIO;
- data_len = le32_to_cpu(con->in_hdr.data_len);
while (cursor->resid) {
page = ceph_msg_data_next(&msg->data, &page_offset, &length,
NULL);