Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359607
b: refs/heads/master
c: c561191
h: refs/heads/master
i:
  359605: 13e319f
  359603: 3429ad7
  359599: b1bc334
v: v3
  • Loading branch information
Alex Elder committed Jan 17, 2013
1 parent 92c5ab0 commit c945f5f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 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: 1821665749a3d7e26ad470c63fc2c46990dc6041
refs/heads/master: c561191813e232aa52022532751855ff5c9fa319
17 changes: 10 additions & 7 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1156,13 +1156,6 @@ static int rbd_do_request(struct request *rq,
osd_req->r_oid_len = strlen(osd_req->r_oid);

osd_req->r_file_layout = rbd_dev->layout; /* struct */

if (op->op == CEPH_OSD_OP_READ || op->op == CEPH_OSD_OP_WRITE) {
op->extent.offset = ofs;
op->extent.length = len;
if (op->op == CEPH_OSD_OP_WRITE)
op->payload_len = len;
}
osd_req->r_num_pages = calc_pages_for(ofs, len);
osd_req->r_page_alignment = ofs & ~PAGE_MASK;

Expand Down Expand Up @@ -1269,6 +1262,13 @@ static int rbd_req_sync_op(struct rbd_device *rbd_dev,
if (IS_ERR(pages))
return PTR_ERR(pages);

if (op->op == CEPH_OSD_OP_READ || op->op == CEPH_OSD_OP_WRITE) {
op->extent.offset = ofs;
op->extent.length = inbound_size;
if (op->op == CEPH_OSD_OP_WRITE)
op->payload_len = inbound_size;
}

ret = rbd_do_request(NULL, rbd_dev, NULL, CEPH_NOSNAP,
object_name, ofs, inbound_size, NULL,
pages, num_pages,
Expand Down Expand Up @@ -1332,6 +1332,9 @@ static int rbd_do_op(struct request *rq,
op = rbd_create_rw_op(opcode, payload_len);
if (!op)
goto done;
op->extent.offset = seg_ofs;
op->extent.length = seg_len;
op->payload_len = payload_len;

/* we've taken care of segment sizes earlier when we
cloned the bios. We should never have a segment
Expand Down

0 comments on commit c945f5f

Please sign in to comment.