• Home
  • Raw
  • Download

Lines Matching full:tail

136 	struct kvec *tail = xdr->tail;  in xdr_inline_pages()  local
146 tail->iov_base = buf + offset; in xdr_inline_pages()
147 tail->iov_len = buflen - offset; in xdr_inline_pages()
313 * moved into the inlined pages and/or the tail.
318 struct kvec *head, *tail; in xdr_shrink_bufhead() local
322 tail = buf->tail; in xdr_shrink_bufhead()
329 /* Shift the tail first */ in xdr_shrink_bufhead()
330 if (tail->iov_len != 0) { in xdr_shrink_bufhead()
331 if (tail->iov_len > len) { in xdr_shrink_bufhead()
332 copy = tail->iov_len - len; in xdr_shrink_bufhead()
333 memmove((char *)tail->iov_base + len, in xdr_shrink_bufhead()
334 tail->iov_base, copy); in xdr_shrink_bufhead()
336 /* Copy from the inlined pages into the tail */ in xdr_shrink_bufhead()
341 if (offs >= tail->iov_len) in xdr_shrink_bufhead()
343 else if (copy > tail->iov_len - offs) in xdr_shrink_bufhead()
344 copy = tail->iov_len - offs; in xdr_shrink_bufhead()
346 _copy_from_pages((char *)tail->iov_base + offs, in xdr_shrink_bufhead()
350 /* Do we also need to copy data from the head into the tail ? */ in xdr_shrink_bufhead()
353 if (copy > tail->iov_len) in xdr_shrink_bufhead()
354 copy = tail->iov_len; in xdr_shrink_bufhead()
355 memcpy(tail->iov_base, in xdr_shrink_bufhead()
389 * moved into the tail.
394 struct kvec *tail; in xdr_shrink_pagelen() local
399 tail = buf->tail; in xdr_shrink_pagelen()
404 /* Shift the tail first */ in xdr_shrink_pagelen()
406 unsigned int free_space = tailbuf_len - tail->iov_len; in xdr_shrink_pagelen()
410 tail->iov_len += free_space; in xdr_shrink_pagelen()
413 if (tail->iov_len > len) { in xdr_shrink_pagelen()
414 char *p = (char *)tail->iov_base + len; in xdr_shrink_pagelen()
415 memmove(p, tail->iov_base, tail->iov_len - len); in xdr_shrink_pagelen()
417 copy = tail->iov_len; in xdr_shrink_pagelen()
418 /* Copy from the inlined pages into the tail */ in xdr_shrink_pagelen()
419 _copy_from_pages((char *)tail->iov_base, in xdr_shrink_pagelen()
463 int scratch_len = buf->buflen - buf->page_len - buf->tail[0].iov_len; in xdr_init_encode()
591 * head, tail, and page lengths are adjusted to correspond.
600 * simple case of truncating from one position in the tail to another.
607 struct kvec *tail = buf->tail; in xdr_truncate_encode() local
617 fraglen = min_t(int, buf->len - len, tail->iov_len); in xdr_truncate_encode()
618 tail->iov_len -= fraglen; in xdr_truncate_encode()
620 if (tail->iov_len) { in xdr_truncate_encode()
621 xdr->p = tail->iov_base + tail->iov_len; in xdr_truncate_encode()
694 struct kvec *iov = buf->tail; in xdr_write_pages()
769 xdr_set_iov(xdr, xdr->buf->tail, xdr->nwords << 2); in xdr_set_next_page()
778 xdr_set_iov(xdr, xdr->buf->tail, xdr->nwords << 2); in xdr_set_next_buffer()
929 /* Truncate page data and move it into the tail */ in xdr_align_pages()
943 * bytes is moved into the XDR tail[].
960 xdr->iov = iov = buf->tail; in xdr_read_pages()
967 * Position current pointer at beginning of tail, and in xdr_read_pages()
985 * bytes is moved into the XDR tail[]. The current pointer is then
992 * Position current pointer at beginning of tail, and in xdr_enter_page()
1006 buf->tail[0] = empty_iov; in xdr_buf_from_iov()
1057 if (base < buf->tail[0].iov_len) { in xdr_buf_subsegment()
1058 subbuf->tail[0].iov_base = buf->tail[0].iov_base + base; in xdr_buf_subsegment()
1059 subbuf->tail[0].iov_len = min_t(unsigned int, len, in xdr_buf_subsegment()
1060 buf->tail[0].iov_len - base); in xdr_buf_subsegment()
1061 len -= subbuf->tail[0].iov_len; in xdr_buf_subsegment()
1064 base -= buf->tail[0].iov_len; in xdr_buf_subsegment()
1065 subbuf->tail[0].iov_base = buf->tail[0].iov_base; in xdr_buf_subsegment()
1066 subbuf->tail[0].iov_len = 0; in xdr_buf_subsegment()
1090 if (buf->tail[0].iov_len) { in xdr_buf_trim()
1091 cur = min_t(size_t, buf->tail[0].iov_len, trim); in xdr_buf_trim()
1092 buf->tail[0].iov_len -= cur; in xdr_buf_trim()
1129 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __read_bytes_from_xdr_buf()
1130 memcpy(obj, subbuf->tail[0].iov_base, this_len); in __read_bytes_from_xdr_buf()
1160 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __write_bytes_to_xdr_buf()
1161 memcpy(subbuf->tail[0].iov_base, obj, this_len); in __write_bytes_to_xdr_buf()
1202 * entirely in the head or the tail, set object to point to it; otherwise
1203 * try to find space for it at the end of the tail, copy it there, and
1218 /* ..or is the obj contained entirely in the tail? */ in xdr_buf_read_netobj()
1219 obj->data = subbuf.tail[0].iov_base; in xdr_buf_read_netobj()
1220 if (subbuf.tail[0].iov_len == obj->len) in xdr_buf_read_netobj()
1223 /* use end of tail as storage for obj: in xdr_buf_read_netobj()
1227 * tail.) */ in xdr_buf_read_netobj()
1230 if (buf->tail[0].iov_len != 0) in xdr_buf_read_netobj()
1231 obj->data = buf->tail[0].iov_base + buf->tail[0].iov_len; in xdr_buf_read_netobj()
1396 base = buf->page_len; /* align to start of tail */ in xdr_xcode_array2()
1399 /* process tail */ in xdr_xcode_array2()
1402 c = buf->tail->iov_base + base; in xdr_xcode_array2()
1450 buf->head->iov_len + buf->page_len + buf->tail->iov_len) in xdr_encode_array2()
1509 if (offset < buf->tail[0].iov_len) { in xdr_process_buf()
1510 thislen = buf->tail[0].iov_len - offset; in xdr_process_buf()
1513 sg_set_buf(sg, buf->tail[0].iov_base + offset, thislen); in xdr_process_buf()