Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345915
b: refs/heads/master
c: 9f69230
h: refs/heads/master
i:
  345913: 956d600
  345911: 8a64662
v: v3
  • Loading branch information
Andreas Gruenbacher authored and Philipp Reisner committed Nov 8, 2012
1 parent 7d71462 commit 9705b11
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 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: 88b390ff639ce5d9a1e741bb2f975e932d5cb605
refs/heads/master: 9f69230cd6e8dc87bf6b55e46c51418a2b6ac322
13 changes: 8 additions & 5 deletions trunk/drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1500,16 +1500,19 @@ static int _drbd_send_zc_ee(struct drbd_conf *mdev,
{
struct page *page = peer_req->pages;
unsigned len = peer_req->i.size;
int err;

/* hint all but last page with MSG_MORE */
page_chain_for_each(page) {
unsigned l = min_t(unsigned, len, PAGE_SIZE);
if (_drbd_send_page(mdev, page, 0, l,
page_chain_next(page) ? MSG_MORE : 0))
return 0;

err = _drbd_send_page(mdev, page, 0, l,
page_chain_next(page) ? MSG_MORE : 0);
if (err)
return err;
len -= l;
}
return 1;
return 0;
}

static u32 bio_flags_to_wire(struct drbd_conf *mdev, unsigned long bi_rw)
Expand Down Expand Up @@ -1634,7 +1637,7 @@ int drbd_send_block(struct drbd_conf *mdev, enum drbd_packet cmd,
ok = dgs == drbd_send(mdev->tconn, mdev->tconn->data.socket, dgb, dgs, 0);
}
if (ok)
ok = _drbd_send_zc_ee(mdev, peer_req);
ok = !_drbd_send_zc_ee(mdev, peer_req);

drbd_put_data_sock(mdev->tconn);

Expand Down

0 comments on commit 9705b11

Please sign in to comment.