aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/osd_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ceph/osd_client.c')
-rw-r--r--net/ceph/osd_client.c10
1 files changed, 4 insertions, 6 deletions
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
41int ceph_calc_raw_layout(struct ceph_osd_client *osdc, 41int 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 */
110static int calc_layout(struct ceph_osd_client *osdc, 109static 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 */