rbd: drop oid parameters from ceph_osdc_build_request()
The last two parameters to ceph_osd_build_request() describe the object id, but the values passed always come from the osd request structure whose address is also provided. Get rid of those last two parameters. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
parent
0ec8ce87f3
commit
af77f26caa
3 changed files with 7 additions and 16 deletions
|
@ -1176,11 +1176,7 @@ static int rbd_do_request(struct request *rq,
|
||||||
snapid, ofs, &len, &bno, osd_req, ops);
|
snapid, ofs, &len, &bno, osd_req, ops);
|
||||||
rbd_assert(ret == 0);
|
rbd_assert(ret == 0);
|
||||||
|
|
||||||
ceph_osdc_build_request(osd_req, ofs, &len,
|
ceph_osdc_build_request(osd_req, ofs, &len, ops, snapc, &mtime);
|
||||||
ops,
|
|
||||||
snapc,
|
|
||||||
&mtime,
|
|
||||||
osd_req->r_oid, osd_req->r_oid_len);
|
|
||||||
|
|
||||||
if (linger_req) {
|
if (linger_req) {
|
||||||
ceph_osdc_set_request_linger(osdc, osd_req);
|
ceph_osdc_set_request_linger(osdc, osd_req);
|
||||||
|
|
|
@ -227,9 +227,7 @@ extern void ceph_osdc_build_request(struct ceph_osd_request *req,
|
||||||
u64 off, u64 *plen,
|
u64 off, u64 *plen,
|
||||||
struct ceph_osd_req_op *src_ops,
|
struct ceph_osd_req_op *src_ops,
|
||||||
struct ceph_snap_context *snapc,
|
struct ceph_snap_context *snapc,
|
||||||
struct timespec *mtime,
|
struct timespec *mtime);
|
||||||
const char *oid,
|
|
||||||
int oid_len);
|
|
||||||
|
|
||||||
extern struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *,
|
extern struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *,
|
||||||
struct ceph_file_layout *layout,
|
struct ceph_file_layout *layout,
|
||||||
|
|
|
@ -376,9 +376,7 @@ void ceph_osdc_build_request(struct ceph_osd_request *req,
|
||||||
u64 off, u64 *plen,
|
u64 off, u64 *plen,
|
||||||
struct ceph_osd_req_op *src_ops,
|
struct ceph_osd_req_op *src_ops,
|
||||||
struct ceph_snap_context *snapc,
|
struct ceph_snap_context *snapc,
|
||||||
struct timespec *mtime,
|
struct timespec *mtime)
|
||||||
const char *oid,
|
|
||||||
int oid_len)
|
|
||||||
{
|
{
|
||||||
struct ceph_msg *msg = req->r_request;
|
struct ceph_msg *msg = req->r_request;
|
||||||
struct ceph_osd_request_head *head;
|
struct ceph_osd_request_head *head;
|
||||||
|
@ -405,9 +403,9 @@ void ceph_osdc_build_request(struct ceph_osd_request *req,
|
||||||
|
|
||||||
|
|
||||||
/* fill in oid */
|
/* fill in oid */
|
||||||
head->object_len = cpu_to_le32(oid_len);
|
head->object_len = cpu_to_le32(req->r_oid_len);
|
||||||
memcpy(p, oid, oid_len);
|
memcpy(p, req->r_oid, req->r_oid_len);
|
||||||
p += oid_len;
|
p += req->r_oid_len;
|
||||||
|
|
||||||
src_op = src_ops;
|
src_op = src_ops;
|
||||||
while (src_op->op) {
|
while (src_op->op) {
|
||||||
|
@ -506,8 +504,7 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
|
||||||
|
|
||||||
ceph_osdc_build_request(req, off, plen, ops,
|
ceph_osdc_build_request(req, off, plen, ops,
|
||||||
snapc,
|
snapc,
|
||||||
mtime,
|
mtime);
|
||||||
req->r_oid, req->r_oid_len);
|
|
||||||
|
|
||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue