Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345928
b: refs/heads/master
c: a982dd5
h: refs/heads/master
v: v3
  • Loading branch information
Andreas Gruenbacher authored and Philipp Reisner committed Nov 8, 2012
1 parent c3bdc8e commit 45cc0a7
Show file tree
Hide file tree
Showing 2 changed files with 6 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: e1c1b0fc8fbda14fd4470ba3a24ce6abdc11436f
refs/heads/master: a982dd579cbc99f7c4b81e68b9c99f7a6481f45b
10 changes: 5 additions & 5 deletions trunk/drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,8 +1123,7 @@ send_bitmap_rle_or_plain(struct drbd_conf *mdev,
{
struct p_compressed_bm *p = (void*)h;
unsigned long num_words;
int len;
int ok;
int len, err;

len = fill_bitmap_rle_bits(mdev, p, c);

Expand All @@ -1133,7 +1132,8 @@ send_bitmap_rle_or_plain(struct drbd_conf *mdev,

if (len) {
DCBP_set_code(p, RLE_VLI_Bits);
ok = !_drbd_send_cmd(mdev, mdev->tconn->data.socket, P_COMPRESSED_BITMAP, h,
err = _drbd_send_cmd(mdev, mdev->tconn->data.socket,
P_COMPRESSED_BITMAP, h,
sizeof(*p) + len, 0);

c->packets[0]++;
Expand All @@ -1148,7 +1148,7 @@ send_bitmap_rle_or_plain(struct drbd_conf *mdev,
len = num_words * sizeof(long);
if (len)
drbd_bm_get_lel(mdev, c->word_offset, num_words, (unsigned long*)h->payload);
ok = !_drbd_send_cmd(mdev, mdev->tconn->data.socket, P_BITMAP,
err = _drbd_send_cmd(mdev, mdev->tconn->data.socket, P_BITMAP,
h, sizeof(struct p_header80) + len, 0);
c->word_offset += num_words;
c->bit_offset = c->word_offset * BITS_PER_LONG;
Expand All @@ -1159,7 +1159,7 @@ send_bitmap_rle_or_plain(struct drbd_conf *mdev,
if (c->bit_offset > c->bm_bits)
c->bit_offset = c->bm_bits;
}
if (ok) {
if (!err) {
if (len == 0) {
INFO_bm_xfer_stats(mdev, "send", c);
return 0;
Expand Down

0 comments on commit 45cc0a7

Please sign in to comment.