Commit e75b45cf authored by Alex Elder's avatar Alex Elder

libceph: drop osdc from ceph_calc_raw_layout()

The osdc parameter to ceph_calc_raw_layout() is not used, so get rid
of it.  Consequently, the corresponding parameter in calc_layout()
becomes unused, so get rid of that as well.
Signed-off-by: default avatarAlex Elder <elder@inktank.com>
Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
parent 4d6b250b
...@@ -1168,7 +1168,7 @@ static int rbd_do_request(struct request *rq, ...@@ -1168,7 +1168,7 @@ static int rbd_do_request(struct request *rq,
osd_req->r_oid_len = strlen(osd_req->r_oid); osd_req->r_oid_len = strlen(osd_req->r_oid);
rbd_layout_init(&osd_req->r_file_layout, rbd_dev->spec->pool_id); rbd_layout_init(&osd_req->r_file_layout, rbd_dev->spec->pool_id);
ret = ceph_calc_raw_layout(osdc, &osd_req->r_file_layout, ret = ceph_calc_raw_layout(&osd_req->r_file_layout,
ofs, &len, &bno, osd_req, ops); ofs, &len, &bno, osd_req, ops);
rbd_assert(ret == 0); rbd_assert(ret == 0);
......
...@@ -207,8 +207,7 @@ extern void ceph_osdc_handle_reply(struct ceph_osd_client *osdc, ...@@ -207,8 +207,7 @@ extern void ceph_osdc_handle_reply(struct ceph_osd_client *osdc,
extern void ceph_osdc_handle_map(struct ceph_osd_client *osdc, extern void ceph_osdc_handle_map(struct ceph_osd_client *osdc,
struct ceph_msg *msg); struct ceph_msg *msg);
extern int ceph_calc_raw_layout(struct ceph_osd_client *osdc, extern int ceph_calc_raw_layout(struct ceph_file_layout *layout,
struct ceph_file_layout *layout,
u64 off, u64 *plen, u64 *bno, u64 off, u64 *plen, u64 *bno,
struct ceph_osd_request *req, struct ceph_osd_request *req,
struct ceph_osd_req_op *op); struct ceph_osd_req_op *op);
......
...@@ -38,8 +38,7 @@ static int op_has_extent(int op) ...@@ -38,8 +38,7 @@ static int op_has_extent(int op)
op == CEPH_OSD_OP_WRITE); op == CEPH_OSD_OP_WRITE);
} }
int ceph_calc_raw_layout(struct ceph_osd_client *osdc, int ceph_calc_raw_layout(struct ceph_file_layout *layout,
struct ceph_file_layout *layout,
u64 off, u64 *plen, u64 *bno, u64 off, u64 *plen, u64 *bno,
struct ceph_osd_request *req, struct ceph_osd_request *req,
struct ceph_osd_req_op *op) struct ceph_osd_req_op *op)
...@@ -107,8 +106,7 @@ EXPORT_SYMBOL(ceph_calc_raw_layout); ...@@ -107,8 +106,7 @@ EXPORT_SYMBOL(ceph_calc_raw_layout);
* *
* fill osd op in request message. * fill osd op in request message.
*/ */
static int calc_layout(struct ceph_osd_client *osdc, static int calc_layout(struct ceph_vino vino,
struct ceph_vino vino,
struct ceph_file_layout *layout, struct ceph_file_layout *layout,
u64 off, u64 *plen, u64 off, u64 *plen,
struct ceph_osd_request *req, struct ceph_osd_request *req,
...@@ -117,7 +115,7 @@ static int calc_layout(struct ceph_osd_client *osdc, ...@@ -117,7 +115,7 @@ static int calc_layout(struct ceph_osd_client *osdc,
u64 bno; u64 bno;
int r; int r;
r = ceph_calc_raw_layout(osdc, layout, off, plen, &bno, req, op); r = ceph_calc_raw_layout(layout, off, plen, &bno, req, op);
if (r < 0) if (r < 0)
return r; return r;
...@@ -452,7 +450,7 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc, ...@@ -452,7 +450,7 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
/* calculate max write size */ /* calculate max write size */
r = calc_layout(osdc, vino, layout, off, plen, req, ops); r = calc_layout(vino, layout, off, plen, req, ops);
if (r < 0) if (r < 0)
return ERR_PTR(r); return ERR_PTR(r);
req->r_file_layout = *layout; /* keep a copy */ req->r_file_layout = *layout; /* keep a copy */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment