Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373379
b: refs/heads/master
c: 878efab
h: refs/heads/master
i:
  373377: 1bab26c
  373375: 02dbabe
v: v3
  • Loading branch information
Alex Elder authored and Sage Weil committed May 2, 2013
1 parent 0878df0 commit b65c07d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6518be47f910f62a98cb6044dbb457af55241f95
refs/heads/master: 878efabd3236abaedd0a4539bbb248ac69fed115
17 changes: 4 additions & 13 deletions trunk/net/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1441,8 +1441,10 @@ static void in_msg_pos_next(struct ceph_connection *con, size_t len,

msg_pos->data_pos += received;
msg_pos->page_pos += received;
if (ceph_msg_has_pages(msg))
(void) ceph_msg_data_advance(&msg->p, received);
#ifdef CONFIG_BLOCK
if (ceph_msg_has_bio(msg))
else if (ceph_msg_has_bio(msg))
(void) ceph_msg_data_advance(&msg->b, received);
#endif /* CONFIG_BLOCK */
if (received < len)
Expand Down Expand Up @@ -2192,23 +2194,12 @@ static int read_partial_message_pages(struct ceph_connection *con,
unsigned int data_len, bool do_datacrc)
{
struct ceph_msg *msg = con->in_msg;
struct ceph_msg_pos *msg_pos = &con->in_msg_pos;
struct page **pages;
struct page *page;
size_t page_offset;
size_t length;
unsigned int left;
int ret;

/* (page) data */
pages = msg->p.pages;
BUG_ON(pages == NULL);
page = pages[msg_pos->page];
page_offset = msg_pos->page_pos;
BUG_ON(msg_pos->data_pos >= data_len);
left = data_len - msg_pos->data_pos;
BUG_ON(page_offset >= PAGE_SIZE);
length = min_t(unsigned int, PAGE_SIZE - page_offset, left);
page = ceph_msg_data_next(&msg->p, &page_offset, &length, NULL);

ret = ceph_tcp_recvpage(con->sock, page, page_offset, length);
if (ret <= 0)
Expand Down

0 comments on commit b65c07d

Please sign in to comment.