Lines Matching refs:len
108 u32 len; in ceph_extract_encoded_string() local
112 ceph_decode_32_safe(&sp, end, len, bad); in ceph_extract_encoded_string()
113 if (!ceph_has_room(&sp, end, len)) in ceph_extract_encoded_string()
116 buf = kmalloc(len + 1, gfp); in ceph_extract_encoded_string()
120 if (len) in ceph_extract_encoded_string()
121 memcpy(buf, sp, len); in ceph_extract_encoded_string()
122 buf[len] = '\0'; in ceph_extract_encoded_string()
124 *p = (char *) *p + sizeof (u32) + len; in ceph_extract_encoded_string()
126 *lenp = (size_t) len; in ceph_extract_encoded_string()
188 static inline void ceph_encode_copy(void **p, const void *s, int len) in ceph_encode_copy() argument
190 memcpy(*p, s, len); in ceph_encode_copy()
191 *p += len; in ceph_encode_copy()
200 u32 len = path ? strlen(path) : 0; in ceph_encode_filepath() local
201 BUG_ON(*p + 1 + sizeof(ino) + sizeof(len) + len > end); in ceph_encode_filepath()
204 ceph_encode_32(p, len); in ceph_encode_filepath()
205 if (len) in ceph_encode_filepath()
206 memcpy(*p, path, len); in ceph_encode_filepath()
207 *p += len; in ceph_encode_filepath()
211 const char *s, u32 len) in ceph_encode_string() argument
213 BUG_ON(*p + sizeof(len) + len > end); in ceph_encode_string()
214 ceph_encode_32(p, len); in ceph_encode_string()
215 if (len) in ceph_encode_string()
216 memcpy(*p, s, len); in ceph_encode_string()
217 *p += len; in ceph_encode_string()