Lines Matching refs:end
1826 static int decode_hoid(void **p, void *end, struct ceph_hobject_id *hoid) in decode_hoid() argument
1832 ret = ceph_start_decoding(p, end, 4, "hobject_t", &struct_v, in decode_hoid()
1842 hoid->key = ceph_extract_encoded_string(p, end, &hoid->key_len, in decode_hoid()
1850 hoid->oid = ceph_extract_encoded_string(p, end, &hoid->oid_len, in decode_hoid()
1858 ceph_decode_64_safe(p, end, hoid->snapid, e_inval); in decode_hoid()
1859 ceph_decode_32_safe(p, end, hoid->hash, e_inval); in decode_hoid()
1860 ceph_decode_8_safe(p, end, hoid->is_max, e_inval); in decode_hoid()
1862 hoid->nspace = ceph_extract_encoded_string(p, end, &hoid->nspace_len, in decode_hoid()
1870 ceph_decode_64_safe(p, end, hoid->pool, e_inval); in decode_hoid()
1885 static void encode_hoid(void **p, void *end, const struct ceph_hobject_id *hoid) in encode_hoid() argument
1888 ceph_encode_string(p, end, hoid->key, hoid->key_len); in encode_hoid()
1889 ceph_encode_string(p, end, hoid->oid, hoid->oid_len); in encode_hoid()
1893 ceph_encode_string(p, end, hoid->nspace, hoid->nspace_len); in encode_hoid()
1926 free_hoid(backoff->end); in free_backoff()
1950 if (hoid_compare(hoid, cur->end) < 0) in lookup_containing_backoff()
2126 static void encode_oloc(void **p, void *end, in encode_oloc() argument
2134 ceph_encode_string(p, end, oloc->pool_ns->str, in encode_oloc()
2144 void *const end = p + msg->front_alloc_len; in encode_request_partial() local
2176 encode_oloc(&p, end, &req->r_t.target_oloc); in encode_request_partial()
2177 ceph_encode_string(&p, end, req->r_t.target_oid.name, in encode_request_partial()
2199 BUG_ON(p > end - 8); /* space for features */ in encode_request_partial()
2221 void *const end = p + msg->front_alloc_len; in encode_request_finish() local
2299 BUG_ON(p > end); in encode_request_finish()
3538 static int ceph_oloc_decode(void **p, void *end, in ceph_oloc_decode() argument
3546 ceph_decode_need(p, end, 1 + 1 + 4, e_inval); in ceph_oloc_decode()
3560 ceph_decode_need(p, end, len, e_inval); in ceph_oloc_decode()
3577 ceph_decode_need(p, end, len, e_inval); in ceph_oloc_decode()
3611 static int ceph_redirect_decode(void **p, void *end, in ceph_redirect_decode() argument
3619 ceph_decode_need(p, end, 1 + 1 + 4, e_inval); in ceph_redirect_decode()
3628 ceph_decode_need(p, end, len, e_inval); in ceph_redirect_decode()
3631 ret = ceph_oloc_decode(p, end, &redir->oloc); in ceph_redirect_decode()
3668 void *const end = p + msg->front.iov_len; in decode_MOSDOpReply() local
3676 ceph_decode_32_safe(&p, end, len, e_inval); in decode_MOSDOpReply()
3677 ceph_decode_need(&p, end, len, e_inval); in decode_MOSDOpReply()
3680 ret = ceph_decode_pgid(&p, end, &m->pgid); in decode_MOSDOpReply()
3684 ceph_decode_64_safe(&p, end, m->flags, e_inval); in decode_MOSDOpReply()
3685 ceph_decode_32_safe(&p, end, m->result, e_inval); in decode_MOSDOpReply()
3686 ceph_decode_need(&p, end, sizeof(bad_replay_version), e_inval); in decode_MOSDOpReply()
3689 ceph_decode_32_safe(&p, end, m->epoch, e_inval); in decode_MOSDOpReply()
3691 ceph_decode_32_safe(&p, end, m->num_ops, e_inval); in decode_MOSDOpReply()
3695 ceph_decode_need(&p, end, m->num_ops * sizeof(struct ceph_osd_op), in decode_MOSDOpReply()
3704 ceph_decode_32_safe(&p, end, m->retry_attempt, e_inval); in decode_MOSDOpReply()
3706 ceph_decode_32_safe(&p, end, m->rval[i], e_inval); in decode_MOSDOpReply()
3709 ceph_decode_need(&p, end, sizeof(m->replay_version), e_inval); in decode_MOSDOpReply()
3712 ceph_decode_64_safe(&p, end, m->user_version, e_inval); in decode_MOSDOpReply()
3720 ceph_decode_8_safe(&p, end, decode_redir, e_inval); in decode_MOSDOpReply()
3728 ret = ceph_redirect_decode(&p, end, &m->redirect); in decode_MOSDOpReply()
4003 void *p, void *end, bool incremental, in handle_one_map() argument
4016 newmap = osdmap_apply_incremental(&p, end, in handle_one_map()
4020 newmap = ceph_osdmap_decode(&p, end, ceph_msgr2(osdc->client)); in handle_one_map()
4133 void *const end = p + msg->front.iov_len; in ceph_osdc_handle_map() local
4148 ceph_decode_need(&p, end, sizeof(fsid), bad); in ceph_osdc_handle_map()
4159 ceph_decode_32_safe(&p, end, nr_maps, bad); in ceph_osdc_handle_map()
4162 ceph_decode_need(&p, end, 2*sizeof(u32), bad); in ceph_osdc_handle_map()
4165 ceph_decode_need(&p, end, maplen, bad); in ceph_osdc_handle_map()
4186 ceph_decode_32_safe(&p, end, nr_maps, bad); in ceph_osdc_handle_map()
4189 ceph_decode_need(&p, end, 2*sizeof(u32), bad); in ceph_osdc_handle_map()
4192 ceph_decode_need(&p, end, maplen, bad); in ceph_osdc_handle_map()
4300 struct ceph_hobject_id *end; member
4306 void *const end = p + msg->front.iov_len; in decode_MOSDBackoff() local
4311 ret = ceph_start_decoding(&p, end, 1, "spg_t", &struct_v, &struct_len); in decode_MOSDBackoff()
4315 ret = ceph_decode_pgid(&p, end, &m->spgid.pgid); in decode_MOSDBackoff()
4319 ceph_decode_8_safe(&p, end, m->spgid.shard, e_inval); in decode_MOSDBackoff()
4320 ceph_decode_32_safe(&p, end, m->map_epoch, e_inval); in decode_MOSDBackoff()
4321 ceph_decode_8_safe(&p, end, m->op, e_inval); in decode_MOSDBackoff()
4322 ceph_decode_64_safe(&p, end, m->id, e_inval); in decode_MOSDBackoff()
4328 ret = decode_hoid(&p, end, m->begin); in decode_MOSDBackoff()
4334 m->end = kzalloc(sizeof(*m->end), GFP_NOIO); in decode_MOSDBackoff()
4335 if (!m->end) { in decode_MOSDBackoff()
4340 ret = decode_hoid(&p, end, m->end); in decode_MOSDBackoff()
4343 free_hoid(m->end); in decode_MOSDBackoff()
4358 void *p, *end; in create_backoff_message() local
4367 hoid_encoding_size(backoff->end); in create_backoff_message()
4374 end = p + msg->front_alloc_len; in create_backoff_message()
4380 encode_hoid(&p, end, backoff->begin); in create_backoff_message()
4381 encode_hoid(&p, end, backoff->end); in create_backoff_message()
4382 BUG_ON(p != end); in create_backoff_message()
4420 backoff->end = m->end; in handle_backoff_block()
4421 m->end = NULL; /* ditto */ in handle_backoff_block()
4440 const struct ceph_hobject_id *end) in target_contained_by() argument
4447 return !cmp || (cmp > 0 && hoid_compare(&hoid, end) < 0); in target_contained_by()
4469 hoid_compare(backoff->end, m->end)) { in handle_backoff_unblock()
4497 if (target_contained_by(&req->r_t, m->begin, m->end)) { in handle_backoff_unblock()
4542 free_hoid(m.end); in handle_backoff()
4556 void *const end = p + msg->front.iov_len; in handle_watch_notify() local
4566 ceph_decode_8_safe(&p, end, proto_ver, bad); in handle_watch_notify()
4567 ceph_decode_8_safe(&p, end, opcode, bad); in handle_watch_notify()
4568 ceph_decode_64_safe(&p, end, cookie, bad); in handle_watch_notify()
4570 ceph_decode_64_safe(&p, end, notify_id, bad); in handle_watch_notify()
4573 ceph_decode_32_safe(&p, end, payload_len, bad); in handle_watch_notify()
4574 ceph_decode_need(&p, end, payload_len, bad); in handle_watch_notify()
4580 ceph_decode_32_safe(&p, end, return_code, bad); in handle_watch_notify()
4583 ceph_decode_64_safe(&p, end, notifier_id, bad); in handle_watch_notify()
4981 static int decode_watcher(void **p, void *end, struct ceph_watch_item *item) in decode_watcher() argument
4987 ret = ceph_start_decoding(p, end, 2, "watch_item_t", in decode_watcher()
4993 ceph_decode_copy_safe(p, end, &item->name, sizeof(item->name), bad); in decode_watcher()
4994 ceph_decode_64_safe(p, end, item->cookie, bad); in decode_watcher()
4995 ceph_decode_skip_32(p, end, bad); /* skip timeout seconds */ in decode_watcher()
4998 ret = ceph_decode_entity_addr(p, end, &item->addr); in decode_watcher()
5012 static int decode_watchers(void **p, void *end, in decode_watchers() argument
5021 ret = ceph_start_decoding(p, end, 1, "obj_list_watch_response_t", in decode_watchers()
5032 ret = decode_watcher(p, end, *watchers + i); in decode_watchers()
5084 void *const end = p + req->r_ops[0].outdata_len; in ceph_osdc_list_watchers() local
5086 ret = decode_watchers(&p, end, watchers, num_watchers); in ceph_osdc_list_watchers()
5303 void *p, *end; in osd_req_op_copy_from_init() local
5317 end = p + PAGE_SIZE; in osd_req_op_copy_from_init()
5318 ceph_encode_string(&p, end, src_oid->name, src_oid->name_len); in osd_req_op_copy_from_init()
5319 encode_oloc(&p, end, src_oloc); in osd_req_op_copy_from_init()
5322 op->indata_len = PAGE_SIZE - (end - p); in osd_req_op_copy_from_init()
5728 u64 end; in prep_next_sparse_read() local
5742 end = ceph_sparse_ext_map_end(op); in prep_next_sparse_read()
5743 if (end < sr->sr_req_len) in prep_next_sparse_read()
5744 advance_cursor(cursor, sr->sr_req_len - end, false); in prep_next_sparse_read()