Lines Matching refs:end
1767 static int decode_hoid(void **p, void *end, struct ceph_hobject_id *hoid) in decode_hoid() argument
1773 ret = ceph_start_decoding(p, end, 4, "hobject_t", &struct_v, in decode_hoid()
1783 hoid->key = ceph_extract_encoded_string(p, end, &hoid->key_len, in decode_hoid()
1791 hoid->oid = ceph_extract_encoded_string(p, end, &hoid->oid_len, in decode_hoid()
1799 ceph_decode_64_safe(p, end, hoid->snapid, e_inval); in decode_hoid()
1800 ceph_decode_32_safe(p, end, hoid->hash, e_inval); in decode_hoid()
1801 ceph_decode_8_safe(p, end, hoid->is_max, e_inval); in decode_hoid()
1803 hoid->nspace = ceph_extract_encoded_string(p, end, &hoid->nspace_len, in decode_hoid()
1811 ceph_decode_64_safe(p, end, hoid->pool, e_inval); in decode_hoid()
1826 static void encode_hoid(void **p, void *end, const struct ceph_hobject_id *hoid) in encode_hoid() argument
1829 ceph_encode_string(p, end, hoid->key, hoid->key_len); in encode_hoid()
1830 ceph_encode_string(p, end, hoid->oid, hoid->oid_len); in encode_hoid()
1834 ceph_encode_string(p, end, hoid->nspace, hoid->nspace_len); in encode_hoid()
1867 free_hoid(backoff->end); in free_backoff()
1891 if (hoid_compare(hoid, cur->end) < 0) in lookup_containing_backoff()
2066 static void encode_oloc(void **p, void *end, in encode_oloc() argument
2074 ceph_encode_string(p, end, oloc->pool_ns->str, in encode_oloc()
2084 void *const end = p + msg->front_alloc_len; in encode_request_partial() local
2116 encode_oloc(&p, end, &req->r_t.target_oloc); in encode_request_partial()
2117 ceph_encode_string(&p, end, req->r_t.target_oid.name, in encode_request_partial()
2139 BUG_ON(p > end - 8); /* space for features */ in encode_request_partial()
2161 void *const end = p + msg->front_alloc_len; in encode_request_finish() local
2239 BUG_ON(p > end); in encode_request_finish()
3472 static int ceph_oloc_decode(void **p, void *end, in ceph_oloc_decode() argument
3480 ceph_decode_need(p, end, 1 + 1 + 4, e_inval); in ceph_oloc_decode()
3494 ceph_decode_need(p, end, len, e_inval); in ceph_oloc_decode()
3511 ceph_decode_need(p, end, len, e_inval); in ceph_oloc_decode()
3545 static int ceph_redirect_decode(void **p, void *end, in ceph_redirect_decode() argument
3553 ceph_decode_need(p, end, 1 + 1 + 4, e_inval); in ceph_redirect_decode()
3562 ceph_decode_need(p, end, len, e_inval); in ceph_redirect_decode()
3565 ret = ceph_oloc_decode(p, end, &redir->oloc); in ceph_redirect_decode()
3602 void *const end = p + msg->front.iov_len; in decode_MOSDOpReply() local
3610 ceph_decode_32_safe(&p, end, len, e_inval); in decode_MOSDOpReply()
3611 ceph_decode_need(&p, end, len, e_inval); in decode_MOSDOpReply()
3614 ret = ceph_decode_pgid(&p, end, &m->pgid); in decode_MOSDOpReply()
3618 ceph_decode_64_safe(&p, end, m->flags, e_inval); in decode_MOSDOpReply()
3619 ceph_decode_32_safe(&p, end, m->result, e_inval); in decode_MOSDOpReply()
3620 ceph_decode_need(&p, end, sizeof(bad_replay_version), e_inval); in decode_MOSDOpReply()
3623 ceph_decode_32_safe(&p, end, m->epoch, e_inval); in decode_MOSDOpReply()
3625 ceph_decode_32_safe(&p, end, m->num_ops, e_inval); in decode_MOSDOpReply()
3629 ceph_decode_need(&p, end, m->num_ops * sizeof(struct ceph_osd_op), in decode_MOSDOpReply()
3638 ceph_decode_32_safe(&p, end, m->retry_attempt, e_inval); in decode_MOSDOpReply()
3640 ceph_decode_32_safe(&p, end, m->rval[i], e_inval); in decode_MOSDOpReply()
3643 ceph_decode_need(&p, end, sizeof(m->replay_version), e_inval); in decode_MOSDOpReply()
3646 ceph_decode_64_safe(&p, end, m->user_version, e_inval); in decode_MOSDOpReply()
3654 ceph_decode_8_safe(&p, end, decode_redir, e_inval); in decode_MOSDOpReply()
3662 ret = ceph_redirect_decode(&p, end, &m->redirect); in decode_MOSDOpReply()
3936 void *p, void *end, bool incremental, in handle_one_map() argument
3949 newmap = osdmap_apply_incremental(&p, end, in handle_one_map()
3953 newmap = ceph_osdmap_decode(&p, end, ceph_msgr2(osdc->client)); in handle_one_map()
4066 void *const end = p + msg->front.iov_len; in ceph_osdc_handle_map() local
4081 ceph_decode_need(&p, end, sizeof(fsid), bad); in ceph_osdc_handle_map()
4092 ceph_decode_32_safe(&p, end, nr_maps, bad); in ceph_osdc_handle_map()
4095 ceph_decode_need(&p, end, 2*sizeof(u32), bad); in ceph_osdc_handle_map()
4098 ceph_decode_need(&p, end, maplen, bad); in ceph_osdc_handle_map()
4119 ceph_decode_32_safe(&p, end, nr_maps, bad); in ceph_osdc_handle_map()
4122 ceph_decode_need(&p, end, 2*sizeof(u32), bad); in ceph_osdc_handle_map()
4125 ceph_decode_need(&p, end, maplen, bad); in ceph_osdc_handle_map()
4233 struct ceph_hobject_id *end; member
4239 void *const end = p + msg->front.iov_len; in decode_MOSDBackoff() local
4244 ret = ceph_start_decoding(&p, end, 1, "spg_t", &struct_v, &struct_len); in decode_MOSDBackoff()
4248 ret = ceph_decode_pgid(&p, end, &m->spgid.pgid); in decode_MOSDBackoff()
4252 ceph_decode_8_safe(&p, end, m->spgid.shard, e_inval); in decode_MOSDBackoff()
4253 ceph_decode_32_safe(&p, end, m->map_epoch, e_inval); in decode_MOSDBackoff()
4254 ceph_decode_8_safe(&p, end, m->op, e_inval); in decode_MOSDBackoff()
4255 ceph_decode_64_safe(&p, end, m->id, e_inval); in decode_MOSDBackoff()
4261 ret = decode_hoid(&p, end, m->begin); in decode_MOSDBackoff()
4267 m->end = kzalloc(sizeof(*m->end), GFP_NOIO); in decode_MOSDBackoff()
4268 if (!m->end) { in decode_MOSDBackoff()
4273 ret = decode_hoid(&p, end, m->end); in decode_MOSDBackoff()
4276 free_hoid(m->end); in decode_MOSDBackoff()
4291 void *p, *end; in create_backoff_message() local
4300 hoid_encoding_size(backoff->end); in create_backoff_message()
4307 end = p + msg->front_alloc_len; in create_backoff_message()
4313 encode_hoid(&p, end, backoff->begin); in create_backoff_message()
4314 encode_hoid(&p, end, backoff->end); in create_backoff_message()
4315 BUG_ON(p != end); in create_backoff_message()
4353 backoff->end = m->end; in handle_backoff_block()
4354 m->end = NULL; /* ditto */ in handle_backoff_block()
4373 const struct ceph_hobject_id *end) in target_contained_by() argument
4380 return !cmp || (cmp > 0 && hoid_compare(&hoid, end) < 0); in target_contained_by()
4402 hoid_compare(backoff->end, m->end)) { in handle_backoff_unblock()
4430 if (target_contained_by(&req->r_t, m->begin, m->end)) { in handle_backoff_unblock()
4475 free_hoid(m.end); in handle_backoff()
4489 void *const end = p + msg->front.iov_len; in handle_watch_notify() local
4499 ceph_decode_8_safe(&p, end, proto_ver, bad); in handle_watch_notify()
4500 ceph_decode_8_safe(&p, end, opcode, bad); in handle_watch_notify()
4501 ceph_decode_64_safe(&p, end, cookie, bad); in handle_watch_notify()
4503 ceph_decode_64_safe(&p, end, notify_id, bad); in handle_watch_notify()
4506 ceph_decode_32_safe(&p, end, payload_len, bad); in handle_watch_notify()
4507 ceph_decode_need(&p, end, payload_len, bad); in handle_watch_notify()
4513 ceph_decode_32_safe(&p, end, return_code, bad); in handle_watch_notify()
4516 ceph_decode_64_safe(&p, end, notifier_id, bad); in handle_watch_notify()
4946 static int decode_watcher(void **p, void *end, struct ceph_watch_item *item) in decode_watcher() argument
4952 ret = ceph_start_decoding(p, end, 2, "watch_item_t", in decode_watcher()
4958 ceph_decode_copy_safe(p, end, &item->name, sizeof(item->name), bad); in decode_watcher()
4959 ceph_decode_64_safe(p, end, item->cookie, bad); in decode_watcher()
4960 ceph_decode_skip_32(p, end, bad); /* skip timeout seconds */ in decode_watcher()
4963 ret = ceph_decode_entity_addr(p, end, &item->addr); in decode_watcher()
4977 static int decode_watchers(void **p, void *end, in decode_watchers() argument
4986 ret = ceph_start_decoding(p, end, 1, "obj_list_watch_response_t", in decode_watchers()
4997 ret = decode_watcher(p, end, *watchers + i); in decode_watchers()
5049 void *const end = p + req->r_ops[0].outdata_len; in ceph_osdc_list_watchers() local
5051 ret = decode_watchers(&p, end, watchers, num_watchers); in ceph_osdc_list_watchers()
5268 void *p, *end; in osd_req_op_copy_from_init() local
5282 end = p + PAGE_SIZE; in osd_req_op_copy_from_init()
5283 ceph_encode_string(&p, end, src_oid->name, src_oid->name_len); in osd_req_op_copy_from_init()
5284 encode_oloc(&p, end, src_oloc); in osd_req_op_copy_from_init()
5287 op->indata_len = PAGE_SIZE - (end - p); in osd_req_op_copy_from_init()