Lines Matching full: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) in ceph_mdsmap_decode() argument
130 ceph_decode_need(p, end, 1 + 1, bad); in ceph_mdsmap_decode()
135 ceph_decode_32_safe(p, end, mdsmap_len, bad); in ceph_mdsmap_decode()
136 if (end < *p + mdsmap_len) in ceph_mdsmap_decode()
138 end = *p + mdsmap_len; in ceph_mdsmap_decode()
141 ceph_decode_need(p, end, 8*sizeof(u32) + sizeof(u64), bad); in ceph_mdsmap_decode()
186 ceph_decode_need(p, end, sizeof(u64) + 1, bad); in ceph_mdsmap_decode()
191 ceph_decode_need(p, end, 1 + sizeof(u32), bad); in ceph_mdsmap_decode()
195 if (info_end > end) in ceph_mdsmap_decode()
199 ceph_decode_need(p, end, sizeof(u64) + sizeof(u32), bad); in ceph_mdsmap_decode()
204 ceph_decode_need(p, end, in ceph_mdsmap_decode()
212 err = ceph_decode_entity_addr(p, end, &addr); in ceph_mdsmap_decode()
218 ceph_decode_32_safe(p, end, namelen, bad); in ceph_mdsmap_decode()
221 ceph_decode_32_safe(p, end, num_export_targets, bad); in ceph_mdsmap_decode()
271 ceph_decode_32_safe(p, end, n, bad); in ceph_mdsmap_decode()
276 ceph_decode_need(p, end, sizeof(u64)*(n+1), bad); in ceph_mdsmap_decode()
284 ceph_decode_16_safe(p, end, mdsmap_ev, bad_ext); in ceph_mdsmap_decode()
287 if (__decode_and_drop_compat_set(p, end) < 0) in ceph_mdsmap_decode()
292 __decode_and_drop_type(p, end, u32, bad_ext); in ceph_mdsmap_decode()
294 __decode_and_drop_type(p, end, u64, bad_ext); in ceph_mdsmap_decode()
298 __decode_and_drop_type(p, end, struct ceph_timespec, bad_ext); in ceph_mdsmap_decode()
299 __decode_and_drop_type(p, end, struct ceph_timespec, bad_ext); in ceph_mdsmap_decode()
300 __decode_and_drop_type(p, end, u32, bad_ext); in ceph_mdsmap_decode()
305 ceph_decode_32_safe(p, end, n, bad_ext); in ceph_mdsmap_decode()
306 ceph_decode_need(p, end, sizeof(u32) * n, bad_ext); in ceph_mdsmap_decode()
329 __decode_and_drop_map(p, end, u32, u32, bad_ext); in ceph_mdsmap_decode()
331 __decode_and_drop_map(p, end, u32, u64, bad_ext); in ceph_mdsmap_decode()
333 __decode_and_drop_set(p, end, u32, bad_ext); in ceph_mdsmap_decode()
335 __decode_and_drop_set(p, end, u32, bad_ext); in ceph_mdsmap_decode()
339 __decode_and_drop_type(p, end, u32, bad_ext); in ceph_mdsmap_decode()
343 __decode_and_drop_type(p, end, u8, bad_ext); in ceph_mdsmap_decode()
345 __decode_and_drop_type(p, end, u8, bad_ext); in ceph_mdsmap_decode()
349 __decode_and_drop_type(p, end, u8, bad_ext); in ceph_mdsmap_decode()
354 ceph_decode_8_safe(p, end, m->m_enabled, bad_ext); in ceph_mdsmap_decode()
355 ceph_decode_32_safe(p, end, name_len, bad_ext); in ceph_mdsmap_decode()
356 ceph_decode_need(p, end, name_len, bad_ext); in ceph_mdsmap_decode()
362 ceph_decode_32_safe(p, end, n, bad_ext); in ceph_mdsmap_decode()
364 ceph_decode_need(p, end, need, bad_ext); in ceph_mdsmap_decode()
373 *p = end; in ceph_mdsmap_decode()
383 start, end - start, true); in ceph_mdsmap_decode()