Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359602
b: refs/heads/master
c: 47dba7b
h: refs/heads/master
v: v3
  • Loading branch information
Alex Elder committed Jan 17, 2013
1 parent 648382b commit 9ccc870
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 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: e01e79273b251dbb35ff2522a688229b09481923
refs/heads/master: 47dba7ba2623b088cbbe1ac0aaa1a034f3249b6d
18 changes: 4 additions & 14 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,9 +1123,6 @@ static int rbd_do_request(struct request *rq,
{
struct ceph_osd_request *osd_req;
int ret;
u64 bno;
u64 obj_off = 0;
u64 obj_len = 0;
struct timespec mtime = CURRENT_TIME;
struct rbd_request *rbd_req;
struct ceph_osd_client *osdc;
Expand Down Expand Up @@ -1169,19 +1166,12 @@ static int rbd_do_request(struct request *rq,
osd_req->r_oid_len = strlen(osd_req->r_oid);

rbd_layout_init(&osd_req->r_file_layout, rbd_dev->spec->pool_id);
ret = ceph_calc_file_object_mapping(&osd_req->r_file_layout, ofs, len,
&bno, &obj_off, &obj_len);
rbd_assert(ret == 0);
if (obj_len < len) {
dout(" skipping last %llu, final file extent %llu~%llu\n",
len - obj_len, ofs, obj_len);
len = obj_len;
}

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

0 comments on commit 9ccc870

Please sign in to comment.