Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345910
b: refs/heads/master
c: 6c1005e
h: refs/heads/master
v: v3
  • Loading branch information
Andreas Gruenbacher authored and Philipp Reisner committed Nov 8, 2012
1 parent 285bbb9 commit 8829a43
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 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: 5b9f499c664efc1a72a0fe2538b39db7e75ecd2b
refs/heads/master: 6c1005e74d4142511a165edae72cb6648aa308c5
4 changes: 1 addition & 3 deletions trunk/drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1308,15 +1308,13 @@ int drbd_send_ack_ex(struct drbd_conf *mdev, enum drbd_packet cmd,
int drbd_send_drequest(struct drbd_conf *mdev, int cmd,
sector_t sector, int size, u64 block_id)
{
int ok;
struct p_block_req p;

p.sector = cpu_to_be64(sector);
p.block_id = block_id;
p.blksize = cpu_to_be32(size);

ok = !drbd_send_cmd(mdev, &mdev->tconn->data, cmd, &p.head, sizeof(p));
return ok;
return drbd_send_cmd(mdev, &mdev->tconn->data, cmd, &p.head, sizeof(p));
}

int drbd_send_drequest_csum(struct drbd_conf *mdev, sector_t sector, int size,
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/block/drbd/drbd_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ static int w_make_resync_request(struct drbd_work *w, int cancel)
}
} else {
inc_rs_pending(mdev);
if (!drbd_send_drequest(mdev, P_RS_DATA_REQUEST,
if (drbd_send_drequest(mdev, P_RS_DATA_REQUEST,
sector, size, ID_SYNCER)) {
dev_err(DEV, "drbd_send_drequest() failed, aborting...\n");
dec_rs_pending(mdev);
Expand Down Expand Up @@ -1287,8 +1287,8 @@ int w_send_read_req(struct drbd_work *w, int cancel)
return 1;
}

ok = drbd_send_drequest(mdev, P_DATA_REQUEST, req->i.sector, req->i.size,
(unsigned long)req);
ok = !drbd_send_drequest(mdev, P_DATA_REQUEST, req->i.sector, req->i.size,
(unsigned long)req);

req_mod(req, ok ? HANDED_OVER_TO_NETWORK : SEND_FAILED);

Expand Down

0 comments on commit 8829a43

Please sign in to comment.