diff options
Diffstat (limited to 'net/ceph/osd_client.c')
-rw-r--r-- | net/ceph/osd_client.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index a053e7e4a780..2988d68b24c6 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -765,9 +765,9 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc, | |||
765 | 765 | ||
766 | req->r_oloc.pool = ceph_file_layout_pg_pool(*layout); | 766 | req->r_oloc.pool = ceph_file_layout_pg_pool(*layout); |
767 | 767 | ||
768 | snprintf(req->r_oid, sizeof(req->r_oid), "%llx.%08llx", | 768 | snprintf(req->r_oid.name, sizeof(req->r_oid.name), |
769 | vino.ino, objnum); | 769 | "%llx.%08llx", vino.ino, objnum); |
770 | req->r_oid_len = strlen(req->r_oid); | 770 | req->r_oid.name_len = strlen(req->r_oid.name); |
771 | 771 | ||
772 | return req; | 772 | return req; |
773 | } | 773 | } |
@@ -1269,7 +1269,7 @@ static int __map_request(struct ceph_osd_client *osdc, | |||
1269 | bool was_paused; | 1269 | bool was_paused; |
1270 | 1270 | ||
1271 | dout("map_request %p tid %lld\n", req, req->r_tid); | 1271 | dout("map_request %p tid %lld\n", req, req->r_tid); |
1272 | err = ceph_calc_ceph_pg(&pgid, req->r_oid, osdc->osdmap, | 1272 | err = ceph_calc_ceph_pg(&pgid, req->r_oid.name, osdc->osdmap, |
1273 | req->r_oloc.pool); | 1273 | req->r_oloc.pool); |
1274 | if (err) { | 1274 | if (err) { |
1275 | list_move(&req->r_req_lru_item, &osdc->req_notarget); | 1275 | list_move(&req->r_req_lru_item, &osdc->req_notarget); |
@@ -2118,10 +2118,11 @@ void ceph_osdc_build_request(struct ceph_osd_request *req, u64 off, | |||
2118 | ceph_encode_32(&p, -1); /* preferred */ | 2118 | ceph_encode_32(&p, -1); /* preferred */ |
2119 | 2119 | ||
2120 | /* oid */ | 2120 | /* oid */ |
2121 | ceph_encode_32(&p, req->r_oid_len); | 2121 | ceph_encode_32(&p, req->r_oid.name_len); |
2122 | memcpy(p, req->r_oid, req->r_oid_len); | 2122 | memcpy(p, req->r_oid.name, req->r_oid.name_len); |
2123 | dout("oid '%.*s' len %d\n", req->r_oid_len, req->r_oid, req->r_oid_len); | 2123 | dout("oid '%.*s' len %d\n", req->r_oid.name_len, |
2124 | p += req->r_oid_len; | 2124 | req->r_oid.name, req->r_oid.name_len); |
2125 | p += req->r_oid.name_len; | ||
2125 | 2126 | ||
2126 | /* ops--can imply data */ | 2127 | /* ops--can imply data */ |
2127 | ceph_encode_16(&p, (u16)req->r_num_ops); | 2128 | ceph_encode_16(&p, (u16)req->r_num_ops); |