• Home
  • Raw
  • Download

Lines Matching refs:p

46 #define __decode_and_drop_type(p, end, type, bad)		\  argument
48 if (*p + sizeof(type) > end) \
50 *p += sizeof(type); \
53 #define __decode_and_drop_set(p, end, type, bad) \ argument
57 ceph_decode_32_safe(p, end, n, bad); \
59 ceph_decode_need(p, end, need, bad); \
60 *p += need; \
63 #define __decode_and_drop_map(p, end, ktype, vtype, bad) \ argument
67 ceph_decode_32_safe(p, end, n, bad); \
69 ceph_decode_need(p, end, need, bad); \
70 *p += need; \
74 static int __decode_and_drop_compat_set(void **p, void* end) in __decode_and_drop_compat_set() argument
80 ceph_decode_need(p, end, sizeof(u64) + sizeof(u32), bad); in __decode_and_drop_compat_set()
82 *p += sizeof(u64); in __decode_and_drop_compat_set()
84 n = ceph_decode_32(p); in __decode_and_drop_compat_set()
87 ceph_decode_need(p, end, sizeof(u64) + sizeof(u32), in __decode_and_drop_compat_set()
89 *p += sizeof(u64); in __decode_and_drop_compat_set()
90 len = ceph_decode_32(p); in __decode_and_drop_compat_set()
91 ceph_decode_need(p, end, len, bad); in __decode_and_drop_compat_set()
92 *p += len; in __decode_and_drop_compat_set()
106 struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end) in ceph_mdsmap_decode() argument
109 const void *start = *p; in ceph_mdsmap_decode()
119 ceph_decode_need(p, end, 1 + 1, bad); in ceph_mdsmap_decode()
120 mdsmap_v = ceph_decode_8(p); in ceph_mdsmap_decode()
121 mdsmap_cv = ceph_decode_8(p); in ceph_mdsmap_decode()
124 ceph_decode_32_safe(p, end, mdsmap_len, bad); in ceph_mdsmap_decode()
125 if (end < *p + mdsmap_len) in ceph_mdsmap_decode()
127 end = *p + mdsmap_len; in ceph_mdsmap_decode()
130 ceph_decode_need(p, end, 8*sizeof(u32) + sizeof(u64), bad); in ceph_mdsmap_decode()
131 m->m_epoch = ceph_decode_32(p); in ceph_mdsmap_decode()
132 m->m_client_epoch = ceph_decode_32(p); in ceph_mdsmap_decode()
133 m->m_last_failure = ceph_decode_32(p); in ceph_mdsmap_decode()
134 m->m_root = ceph_decode_32(p); in ceph_mdsmap_decode()
135 m->m_session_timeout = ceph_decode_32(p); in ceph_mdsmap_decode()
136 m->m_session_autoclose = ceph_decode_32(p); in ceph_mdsmap_decode()
137 m->m_max_file_size = ceph_decode_64(p); in ceph_mdsmap_decode()
138 m->m_max_mds = ceph_decode_32(p); in ceph_mdsmap_decode()
146 n = ceph_decode_32(p); in ceph_mdsmap_decode()
160 ceph_decode_need(p, end, sizeof(u64) + 1, bad); in ceph_mdsmap_decode()
161 global_id = ceph_decode_64(p); in ceph_mdsmap_decode()
162 info_v= ceph_decode_8(p); in ceph_mdsmap_decode()
166 ceph_decode_need(p, end, 1 + sizeof(u32), bad); in ceph_mdsmap_decode()
167 info_cv = ceph_decode_8(p); in ceph_mdsmap_decode()
168 info_len = ceph_decode_32(p); in ceph_mdsmap_decode()
169 info_end = *p + info_len; in ceph_mdsmap_decode()
174 ceph_decode_need(p, end, sizeof(u64) + sizeof(u32), bad); in ceph_mdsmap_decode()
175 *p += sizeof(u64); in ceph_mdsmap_decode()
176 namelen = ceph_decode_32(p); /* skip mds name */ in ceph_mdsmap_decode()
177 *p += namelen; in ceph_mdsmap_decode()
179 ceph_decode_need(p, end, in ceph_mdsmap_decode()
183 mds = ceph_decode_32(p); in ceph_mdsmap_decode()
184 inc = ceph_decode_32(p); in ceph_mdsmap_decode()
185 state = ceph_decode_32(p); in ceph_mdsmap_decode()
186 state_seq = ceph_decode_64(p); in ceph_mdsmap_decode()
187 ceph_decode_copy(p, &addr, sizeof(addr)); in ceph_mdsmap_decode()
189 ceph_decode_copy(p, &laggy_since, sizeof(laggy_since)); in ceph_mdsmap_decode()
190 *p += sizeof(u32); in ceph_mdsmap_decode()
191 ceph_decode_32_safe(p, end, namelen, bad); in ceph_mdsmap_decode()
192 *p += namelen; in ceph_mdsmap_decode()
194 ceph_decode_32_safe(p, end, num_export_targets, bad); in ceph_mdsmap_decode()
195 pexport_targets = *p; in ceph_mdsmap_decode()
196 *p += num_export_targets * sizeof(u32); in ceph_mdsmap_decode()
201 if (info_end && *p != info_end) { in ceph_mdsmap_decode()
202 if (*p > info_end) in ceph_mdsmap_decode()
204 *p = info_end; in ceph_mdsmap_decode()
255 ceph_decode_32_safe(p, end, n, bad); in ceph_mdsmap_decode()
260 ceph_decode_need(p, end, sizeof(u64)*(n+1), bad); in ceph_mdsmap_decode()
262 m->m_data_pg_pools[i] = ceph_decode_64(p); in ceph_mdsmap_decode()
263 m->m_cas_pg_pool = ceph_decode_64(p); in ceph_mdsmap_decode()
268 ceph_decode_16_safe(p, end, mdsmap_ev, bad_ext); in ceph_mdsmap_decode()
271 if (__decode_and_drop_compat_set(p, end) < 0) in ceph_mdsmap_decode()
276 __decode_and_drop_type(p, end, u32, bad_ext); in ceph_mdsmap_decode()
278 __decode_and_drop_type(p, end, u64, bad_ext); in ceph_mdsmap_decode()
282 __decode_and_drop_type(p, end, struct ceph_timespec, bad_ext); in ceph_mdsmap_decode()
283 __decode_and_drop_type(p, end, struct ceph_timespec, bad_ext); in ceph_mdsmap_decode()
284 __decode_and_drop_type(p, end, u32, bad_ext); in ceph_mdsmap_decode()
289 ceph_decode_32_safe(p, end, n, bad_ext); in ceph_mdsmap_decode()
290 ceph_decode_need(p, end, sizeof(u32) * n, bad_ext); in ceph_mdsmap_decode()
293 s32 mds = ceph_decode_32(p); in ceph_mdsmap_decode()
313 __decode_and_drop_map(p, end, u32, u32, bad_ext); in ceph_mdsmap_decode()
315 __decode_and_drop_map(p, end, u32, u64, bad_ext); in ceph_mdsmap_decode()
317 __decode_and_drop_set(p, end, u32, bad_ext); in ceph_mdsmap_decode()
319 __decode_and_drop_set(p, end, u32, bad_ext); in ceph_mdsmap_decode()
323 __decode_and_drop_type(p, end, u32, bad_ext); in ceph_mdsmap_decode()
327 __decode_and_drop_type(p, end, u8, bad_ext); in ceph_mdsmap_decode()
329 __decode_and_drop_type(p, end, u8, bad_ext); in ceph_mdsmap_decode()
333 __decode_and_drop_type(p, end, u8, bad_ext); in ceph_mdsmap_decode()
338 ceph_decode_8_safe(p, end, m->m_enabled, bad_ext); in ceph_mdsmap_decode()
339 ceph_decode_32_safe(p, end, name_len, bad_ext); in ceph_mdsmap_decode()
340 ceph_decode_need(p, end, name_len, bad_ext); in ceph_mdsmap_decode()
341 *p += name_len; in ceph_mdsmap_decode()
346 ceph_decode_32_safe(p, end, n, bad_ext); in ceph_mdsmap_decode()
348 ceph_decode_need(p, end, need, bad_ext); in ceph_mdsmap_decode()
349 *p += need; in ceph_mdsmap_decode()
355 *p = end; in ceph_mdsmap_decode()