• Home
  • Raw
  • Download

Lines Matching refs:end

70 static int parse_reply_info_quota(void **p, void *end,  in parse_reply_info_quota()  argument
76 ceph_decode_8_safe(p, end, struct_v, bad); in parse_reply_info_quota()
77 ceph_decode_8_safe(p, end, struct_compat, bad); in parse_reply_info_quota()
82 ceph_decode_32_safe(p, end, struct_len, bad); in parse_reply_info_quota()
83 ceph_decode_need(p, end, struct_len, bad); in parse_reply_info_quota()
84 end = *p + struct_len; in parse_reply_info_quota()
85 ceph_decode_64_safe(p, end, info->max_bytes, bad); in parse_reply_info_quota()
86 ceph_decode_64_safe(p, end, info->max_files, bad); in parse_reply_info_quota()
87 *p = end; in parse_reply_info_quota()
96 static int parse_reply_info_in(void **p, void *end, in parse_reply_info_in() argument
106 ceph_decode_8_safe(p, end, struct_v, bad); in parse_reply_info_in()
107 ceph_decode_8_safe(p, end, struct_compat, bad); in parse_reply_info_in()
112 ceph_decode_32_safe(p, end, struct_len, bad); in parse_reply_info_in()
113 ceph_decode_need(p, end, struct_len, bad); in parse_reply_info_in()
114 end = *p + struct_len; in parse_reply_info_in()
117 ceph_decode_need(p, end, sizeof(struct ceph_mds_reply_inode), bad); in parse_reply_info_in()
123 ceph_decode_32_safe(p, end, info->symlink_len, bad); in parse_reply_info_in()
124 ceph_decode_need(p, end, info->symlink_len, bad); in parse_reply_info_in()
128 ceph_decode_copy_safe(p, end, &info->dir_layout, in parse_reply_info_in()
130 ceph_decode_32_safe(p, end, info->xattr_len, bad); in parse_reply_info_in()
131 ceph_decode_need(p, end, info->xattr_len, bad); in parse_reply_info_in()
137 ceph_decode_64_safe(p, end, info->inline_version, bad); in parse_reply_info_in()
138 ceph_decode_32_safe(p, end, info->inline_len, bad); in parse_reply_info_in()
139 ceph_decode_need(p, end, info->inline_len, bad); in parse_reply_info_in()
143 err = parse_reply_info_quota(p, end, info); in parse_reply_info_in()
147 ceph_decode_32_safe(p, end, info->pool_ns_len, bad); in parse_reply_info_in()
149 ceph_decode_need(p, end, info->pool_ns_len, bad); in parse_reply_info_in()
155 ceph_decode_need(p, end, sizeof(info->btime), bad); in parse_reply_info_in()
159 ceph_decode_64_safe(p, end, info->change_attr, bad); in parse_reply_info_in()
163 ceph_decode_32_safe(p, end, info->dir_pin, bad); in parse_reply_info_in()
170 ceph_decode_need(p, end, sizeof(info->snap_btime), bad); in parse_reply_info_in()
177 *p = end; in parse_reply_info_in()
180 ceph_decode_64_safe(p, end, info->inline_version, bad); in parse_reply_info_in()
181 ceph_decode_32_safe(p, end, info->inline_len, bad); in parse_reply_info_in()
182 ceph_decode_need(p, end, info->inline_len, bad); in parse_reply_info_in()
189 err = parse_reply_info_quota(p, end, info); in parse_reply_info_in()
200 ceph_decode_32_safe(p, end, info->pool_ns_len, bad); in parse_reply_info_in()
202 ceph_decode_need(p, end, info->pool_ns_len, bad); in parse_reply_info_in()
209 ceph_decode_need(p, end, sizeof(info->btime), bad); in parse_reply_info_in()
211 ceph_decode_64_safe(p, end, info->change_attr, bad); in parse_reply_info_in()
224 static int parse_reply_info_dir(void **p, void *end, in parse_reply_info_dir() argument
231 ceph_decode_8_safe(p, end, struct_v, bad); in parse_reply_info_dir()
232 ceph_decode_8_safe(p, end, struct_compat, bad); in parse_reply_info_dir()
237 ceph_decode_32_safe(p, end, struct_len, bad); in parse_reply_info_dir()
238 ceph_decode_need(p, end, struct_len, bad); in parse_reply_info_dir()
239 end = *p + struct_len; in parse_reply_info_dir()
242 ceph_decode_need(p, end, sizeof(**dirfrag), bad); in parse_reply_info_dir()
245 if (unlikely(*p > end)) in parse_reply_info_dir()
248 *p = end; in parse_reply_info_dir()
254 static int parse_reply_info_lease(void **p, void *end, in parse_reply_info_lease() argument
261 ceph_decode_8_safe(p, end, struct_v, bad); in parse_reply_info_lease()
262 ceph_decode_8_safe(p, end, struct_compat, bad); in parse_reply_info_lease()
267 ceph_decode_32_safe(p, end, struct_len, bad); in parse_reply_info_lease()
268 ceph_decode_need(p, end, struct_len, bad); in parse_reply_info_lease()
269 end = *p + struct_len; in parse_reply_info_lease()
272 ceph_decode_need(p, end, sizeof(**lease), bad); in parse_reply_info_lease()
276 *p = end; in parse_reply_info_lease()
286 static int parse_reply_info_trace(void **p, void *end, in parse_reply_info_trace() argument
293 err = parse_reply_info_in(p, end, &info->diri, features); in parse_reply_info_trace()
297 err = parse_reply_info_dir(p, end, &info->dirfrag, features); in parse_reply_info_trace()
301 ceph_decode_32_safe(p, end, info->dname_len, bad); in parse_reply_info_trace()
302 ceph_decode_need(p, end, info->dname_len, bad); in parse_reply_info_trace()
306 err = parse_reply_info_lease(p, end, &info->dlease, features); in parse_reply_info_trace()
312 err = parse_reply_info_in(p, end, &info->targeti, features); in parse_reply_info_trace()
317 if (unlikely(*p != end)) in parse_reply_info_trace()
331 static int parse_reply_info_readdir(void **p, void *end, in parse_reply_info_readdir() argument
338 err = parse_reply_info_dir(p, end, &info->dir_dir, features); in parse_reply_info_readdir()
342 ceph_decode_need(p, end, sizeof(num) + 2, bad); in parse_reply_info_readdir()
366 ceph_decode_32_safe(p, end, rde->name_len, bad); in parse_reply_info_readdir()
367 ceph_decode_need(p, end, rde->name_len, bad); in parse_reply_info_readdir()
373 err = parse_reply_info_lease(p, end, &rde->lease, features); in parse_reply_info_readdir()
377 err = parse_reply_info_in(p, end, &rde->inode, features); in parse_reply_info_readdir()
388 *p = end; in parse_reply_info_readdir()
401 static int parse_reply_info_filelock(void **p, void *end, in parse_reply_info_filelock() argument
405 if (*p + sizeof(*info->filelock_reply) > end) in parse_reply_info_filelock()
411 *p = end; in parse_reply_info_filelock()
420 static int parse_reply_info_create(void **p, void *end, in parse_reply_info_create() argument
427 if (*p == end) { in parse_reply_info_create()
431 ceph_decode_64_safe(p, end, info->ino, bad); in parse_reply_info_create()
434 if (*p != end) in parse_reply_info_create()
439 *p = end; in parse_reply_info_create()
448 static int parse_reply_info_extra(void **p, void *end, in parse_reply_info_extra() argument
455 return parse_reply_info_filelock(p, end, info, features); in parse_reply_info_extra()
457 return parse_reply_info_readdir(p, end, info, features); in parse_reply_info_extra()
459 return parse_reply_info_create(p, end, info, features); in parse_reply_info_extra()
471 void *p, *end; in parse_reply_info() local
477 end = p + msg->front.iov_len - sizeof(struct ceph_mds_reply_head); in parse_reply_info()
480 ceph_decode_32_safe(&p, end, len, bad); in parse_reply_info()
482 ceph_decode_need(&p, end, len, bad); in parse_reply_info()
489 ceph_decode_32_safe(&p, end, len, bad); in parse_reply_info()
491 ceph_decode_need(&p, end, len, bad); in parse_reply_info()
498 ceph_decode_32_safe(&p, end, len, bad); in parse_reply_info()
503 if (p != end) in parse_reply_info()
1048 static void encode_supported_features(void **p, void *end) in encode_supported_features() argument
1057 BUG_ON(*p + 4 + size > end); in encode_supported_features()
1064 BUG_ON(*p + 4 > end); in encode_supported_features()
1082 void *p, *end; in create_session_open_msg() local
1110 end = p + msg->front.iov_len; in create_session_open_msg()
1144 encode_supported_features(&p, end); in create_session_open_msg()
2297 void *p, *end; in create_request_message() local
2344 end = msg->front.iov_base + msg->front.iov_len; in create_request_message()
2352 ceph_encode_filepath(&p, end, ino1, path1); in create_request_message()
2353 ceph_encode_filepath(&p, end, ino2, path2); in create_request_message()
2392 BUG_ON(p > end); in create_request_message()
3000 void *end = p + msg->front.iov_len; in handle_forward() local
3002 ceph_decode_need(&p, end, 2*sizeof(u32), bad); in handle_forward()
3039 static int __decode_session_metadata(void **p, void *end, in __decode_session_metadata() argument
3045 ceph_decode_32_safe(p, end, n, bad); in __decode_session_metadata()
3048 ceph_decode_32_safe(p, end, len, bad); in __decode_session_metadata()
3049 ceph_decode_need(p, end, len, bad); in __decode_session_metadata()
3052 ceph_decode_32_safe(p, end, len, bad); in __decode_session_metadata()
3053 ceph_decode_need(p, end, len, bad); in __decode_session_metadata()
3073 void *end = p + msg->front.iov_len; in handle_session() local
3082 ceph_decode_need(&p, end, sizeof(*h), bad); in handle_session()
3092 if (__decode_session_metadata(&p, end, &blacklisted) < 0) in handle_session()
3095 ceph_decode_32_safe(&p, end, len, bad); in handle_session()
3096 ceph_decode_need(&p, end, len, bad); in handle_session()
4467 void *end = p + msg->front.iov_len; in ceph_mdsc_handle_fsmap() local
4475 ceph_decode_need(&p, end, sizeof(u32), bad); in ceph_mdsc_handle_fsmap()
4480 ceph_decode_need(&p, end, 2 + sizeof(u32), bad); in ceph_mdsc_handle_fsmap()
4485 ceph_decode_need(&p, end, sizeof(u32) * 3, bad); in ceph_mdsc_handle_fsmap()
4495 ceph_decode_need(&p, end, 2 + sizeof(u32), bad); in ceph_mdsc_handle_fsmap()
4499 ceph_decode_need(&p, end, info_len, bad); in ceph_mdsc_handle_fsmap()
4546 void *end = p + msg->front.iov_len; in ceph_mdsc_handle_mdsmap() local
4551 ceph_decode_need(&p, end, sizeof(fsid)+2*sizeof(u32), bad); in ceph_mdsc_handle_mdsmap()
4568 newmap = ceph_mdsmap_decode(&p, end); in ceph_mdsc_handle_mdsmap()