diff options
| -rw-r--r-- | drivers/block/rbd.c | 2 | ||||
| -rw-r--r-- | include/linux/ceph/osd_client.h | 3 | ||||
| -rw-r--r-- | net/ceph/osd_client.c | 10 |
3 files changed, 6 insertions, 9 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index fa371868e9b0..ac8fd3856509 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
| @@ -1168,7 +1168,7 @@ static int rbd_do_request(struct request *rq, | |||
| 1168 | osd_req->r_oid_len = strlen(osd_req->r_oid); | 1168 | osd_req->r_oid_len = strlen(osd_req->r_oid); |
| 1169 | 1169 | ||
| 1170 | rbd_layout_init(&osd_req->r_file_layout, rbd_dev->spec->pool_id); | 1170 | rbd_layout_init(&osd_req->r_file_layout, rbd_dev->spec->pool_id); |
| 1171 | ret = ceph_calc_raw_layout(osdc, &osd_req->r_file_layout, | 1171 | ret = ceph_calc_raw_layout(&osd_req->r_file_layout, |
| 1172 | ofs, &len, &bno, osd_req, ops); | 1172 | ofs, &len, &bno, osd_req, ops); |
| 1173 | rbd_assert(ret == 0); | 1173 | rbd_assert(ret == 0); |
| 1174 | 1174 | ||
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 0e82a0a967ef..fe3a6e8db1f9 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
| @@ -207,8 +207,7 @@ extern void ceph_osdc_handle_reply(struct ceph_osd_client *osdc, | |||
| 207 | extern void ceph_osdc_handle_map(struct ceph_osd_client *osdc, | 207 | extern void ceph_osdc_handle_map(struct ceph_osd_client *osdc, |
| 208 | struct ceph_msg *msg); | 208 | struct ceph_msg *msg); |
| 209 | 209 | ||
| 210 | extern int ceph_calc_raw_layout(struct ceph_osd_client *osdc, | 210 | extern int ceph_calc_raw_layout(struct ceph_file_layout *layout, |
| 211 | struct ceph_file_layout *layout, | ||
| 212 | u64 off, u64 *plen, u64 *bno, | 211 | u64 off, u64 *plen, u64 *bno, |
| 213 | struct ceph_osd_request *req, | 212 | struct ceph_osd_request *req, |
| 214 | struct ceph_osd_req_op *op); | 213 | struct ceph_osd_req_op *op); |
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index b5a4b2875e8a..cd9c28387de3 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
| @@ -38,8 +38,7 @@ static int op_has_extent(int op) | |||
| 38 | op == CEPH_OSD_OP_WRITE); | 38 | op == CEPH_OSD_OP_WRITE); |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | int ceph_calc_raw_layout(struct ceph_osd_client *osdc, | 41 | int ceph_calc_raw_layout(struct ceph_file_layout *layout, |
| 42 | struct ceph_file_layout *layout, | ||
| 43 | u64 off, u64 *plen, u64 *bno, | 42 | u64 off, u64 *plen, u64 *bno, |
| 44 | struct ceph_osd_request *req, | 43 | struct ceph_osd_request *req, |
| 45 | struct ceph_osd_req_op *op) | 44 | struct ceph_osd_req_op *op) |
| @@ -107,8 +106,7 @@ EXPORT_SYMBOL(ceph_calc_raw_layout); | |||
| 107 | * | 106 | * |
| 108 | * fill osd op in request message. | 107 | * fill osd op in request message. |
| 109 | */ | 108 | */ |
| 110 | static int calc_layout(struct ceph_osd_client *osdc, | 109 | static int calc_layout(struct ceph_vino vino, |
| 111 | struct ceph_vino vino, | ||
| 112 | struct ceph_file_layout *layout, | 110 | struct ceph_file_layout *layout, |
| 113 | u64 off, u64 *plen, | 111 | u64 off, u64 *plen, |
| 114 | struct ceph_osd_request *req, | 112 | struct ceph_osd_request *req, |
| @@ -117,7 +115,7 @@ static int calc_layout(struct ceph_osd_client *osdc, | |||
| 117 | u64 bno; | 115 | u64 bno; |
| 118 | int r; | 116 | int r; |
| 119 | 117 | ||
| 120 | r = ceph_calc_raw_layout(osdc, layout, off, plen, &bno, req, op); | 118 | r = ceph_calc_raw_layout(layout, off, plen, &bno, req, op); |
| 121 | if (r < 0) | 119 | if (r < 0) |
| 122 | return r; | 120 | return r; |
| 123 | 121 | ||
| @@ -452,7 +450,7 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc, | |||
| 452 | return ERR_PTR(-ENOMEM); | 450 | return ERR_PTR(-ENOMEM); |
| 453 | 451 | ||
| 454 | /* calculate max write size */ | 452 | /* calculate max write size */ |
| 455 | r = calc_layout(osdc, vino, layout, off, plen, req, ops); | 453 | r = calc_layout(vino, layout, off, plen, req, ops); |
| 456 | if (r < 0) | 454 | if (r < 0) |
| 457 | return ERR_PTR(r); | 455 | return ERR_PTR(r); |
| 458 | req->r_file_layout = *layout; /* keep a copy */ | 456 | req->r_file_layout = *layout; /* keep a copy */ |
