Lines Matching refs:end
57 #define __decode_and_drop_type(p, end, type, bad) \ argument
59 if (*p + sizeof(type) > end) \
64 #define __decode_and_drop_set(p, end, type, bad) \ argument
68 ceph_decode_32_safe(p, end, n, bad); \
70 ceph_decode_need(p, end, need, bad); \
74 #define __decode_and_drop_map(p, end, ktype, vtype, bad) \ argument
78 ceph_decode_32_safe(p, end, n, bad); \
80 ceph_decode_need(p, end, need, bad); \
85 static int __decode_and_drop_compat_set(void **p, void* end) in __decode_and_drop_compat_set() argument
91 ceph_decode_need(p, end, sizeof(u64) + sizeof(u32), bad); in __decode_and_drop_compat_set()
98 ceph_decode_need(p, end, sizeof(u64) + sizeof(u32), in __decode_and_drop_compat_set()
102 ceph_decode_need(p, end, len, bad); in __decode_and_drop_compat_set()
117 struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end, bool msgr2) in ceph_mdsmap_decode() argument
131 ceph_decode_need(p, end, 1 + 1, bad); in ceph_mdsmap_decode()
136 ceph_decode_32_safe(p, end, mdsmap_len, bad); in ceph_mdsmap_decode()
137 if (end < *p + mdsmap_len) in ceph_mdsmap_decode()
139 end = *p + mdsmap_len; in ceph_mdsmap_decode()
142 ceph_decode_need(p, end, 8*sizeof(u32) + sizeof(u64), bad); in ceph_mdsmap_decode()
187 ceph_decode_need(p, end, sizeof(u64) + 1, bad); in ceph_mdsmap_decode()
192 ceph_decode_need(p, end, 1 + sizeof(u32), bad); in ceph_mdsmap_decode()
196 if (info_end > end) in ceph_mdsmap_decode()
200 ceph_decode_need(p, end, sizeof(u64) + sizeof(u32), bad); in ceph_mdsmap_decode()
205 ceph_decode_32_safe(p, end, mds, bad); in ceph_mdsmap_decode()
206 ceph_decode_32_safe(p, end, inc, bad); in ceph_mdsmap_decode()
207 ceph_decode_32_safe(p, end, state, bad); in ceph_mdsmap_decode()
210 err = ceph_decode_entity_addrvec(p, end, msgr2, &addr); in ceph_mdsmap_decode()
212 err = ceph_decode_entity_addr(p, end, &addr); in ceph_mdsmap_decode()
216 ceph_decode_copy_safe(p, end, &laggy_since, sizeof(laggy_since), in ceph_mdsmap_decode()
220 ceph_decode_32_safe(p, end, namelen, bad); in ceph_mdsmap_decode()
223 ceph_decode_32_safe(p, end, num_export_targets, bad); in ceph_mdsmap_decode()
274 ceph_decode_32_safe(p, end, n, bad); in ceph_mdsmap_decode()
279 ceph_decode_need(p, end, sizeof(u64)*(n+1), bad); in ceph_mdsmap_decode()
287 ceph_decode_16_safe(p, end, mdsmap_ev, bad_ext); in ceph_mdsmap_decode()
290 if (__decode_and_drop_compat_set(p, end) < 0) in ceph_mdsmap_decode()
295 __decode_and_drop_type(p, end, u32, bad_ext); in ceph_mdsmap_decode()
297 __decode_and_drop_type(p, end, u64, bad_ext); in ceph_mdsmap_decode()
301 __decode_and_drop_type(p, end, struct ceph_timespec, bad_ext); in ceph_mdsmap_decode()
302 __decode_and_drop_type(p, end, struct ceph_timespec, bad_ext); in ceph_mdsmap_decode()
303 __decode_and_drop_type(p, end, u32, bad_ext); in ceph_mdsmap_decode()
308 ceph_decode_32_safe(p, end, n, bad_ext); in ceph_mdsmap_decode()
309 ceph_decode_need(p, end, sizeof(u32) * n, bad_ext); in ceph_mdsmap_decode()
332 __decode_and_drop_map(p, end, u32, u32, bad_ext); in ceph_mdsmap_decode()
334 __decode_and_drop_map(p, end, u32, u64, bad_ext); in ceph_mdsmap_decode()
336 __decode_and_drop_set(p, end, u32, bad_ext); in ceph_mdsmap_decode()
338 __decode_and_drop_set(p, end, u32, bad_ext); in ceph_mdsmap_decode()
342 __decode_and_drop_type(p, end, u32, bad_ext); in ceph_mdsmap_decode()
346 __decode_and_drop_type(p, end, u8, bad_ext); in ceph_mdsmap_decode()
348 __decode_and_drop_type(p, end, u8, bad_ext); in ceph_mdsmap_decode()
352 __decode_and_drop_type(p, end, u8, bad_ext); in ceph_mdsmap_decode()
356 ceph_decode_8_safe(p, end, m->m_enabled, bad_ext); in ceph_mdsmap_decode()
358 ceph_decode_skip_string(p, end, bad_ext); in ceph_mdsmap_decode()
363 ceph_decode_32_safe(p, end, n, bad_ext); in ceph_mdsmap_decode()
365 ceph_decode_need(p, end, need, bad_ext); in ceph_mdsmap_decode()
373 ceph_decode_skip_string(p, end, bad_ext); in ceph_mdsmap_decode()
375 ceph_decode_skip_32(p, end, bad_ext); in ceph_mdsmap_decode()
377 ceph_decode_skip_32(p, end, bad_ext); in ceph_mdsmap_decode()
379 ceph_decode_skip_8(p, end, bad_ext); in ceph_mdsmap_decode()
381 ceph_decode_skip_set(p, end, 64, bad_ext); in ceph_mdsmap_decode()
382 ceph_decode_64_safe(p, end, m->m_max_xattr_size, bad_ext); in ceph_mdsmap_decode()
390 *p = end; in ceph_mdsmap_decode()
400 start, end - start, true); in ceph_mdsmap_decode()