Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345926
b: refs/heads/master
c: 28284ce
h: refs/heads/master
v: v3
  • Loading branch information
Andreas Gruenbacher authored and Philipp Reisner committed Nov 8, 2012
1 parent 3a29ddb commit 13186a6
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: fc5be8397fb79b70142e6d32e5d9d063c42c8756
refs/heads/master: 28284ceff043b14defcf8122b765fe0b21bd9344
10 changes: 5 additions & 5 deletions trunk/drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@ static int recv_dless_read(struct drbd_conf *mdev, struct drbd_request *req,
dev_warn(DEV,
"short read receiving data reply digest: read %d expected %d\n",
rr, dgs);
return 0;
return rr < 0 ? rr : -EIO;
}
}

Expand All @@ -1450,7 +1450,7 @@ static int recv_dless_read(struct drbd_conf *mdev, struct drbd_request *req,
dev_warn(DEV, "short read receiving data reply: "
"read %d expected %d\n",
rr, expect);
return 0;
return rr < 0 ? rr : -EIO;
}
data_size -= rr;
}
Expand All @@ -1459,12 +1459,12 @@ static int recv_dless_read(struct drbd_conf *mdev, struct drbd_request *req,
drbd_csum_bio(mdev, mdev->tconn->integrity_r_tfm, bio, dig_vv);
if (memcmp(dig_in, dig_vv, dgs)) {
dev_err(DEV, "Digest integrity check FAILED. Broken NICs?\n");
return 0;
return -EINVAL;
}
}

D_ASSERT(data_size == 0);
return 1;
return 0;
}

/* e_end_resync_block() is called via
Expand Down Expand Up @@ -1565,7 +1565,7 @@ static int receive_DataReply(struct drbd_conf *mdev, enum drbd_packet cmd,
/* hlist_del(&req->collision) is done in _req_may_be_done, to avoid
* special casing it there for the various failure cases.
* still no race with drbd_fail_pending_reads */
ok = recv_dless_read(mdev, req, sector, data_size);
ok = !recv_dless_read(mdev, req, sector, data_size);

if (ok)
req_mod(req, DATA_RECEIVED);
Expand Down

0 comments on commit 13186a6

Please sign in to comment.