Lines Matching full:tail

151 	const struct kvec *tail = xdr->tail;  in xdr_buf_to_bvec()  local
176 if (tail->iov_len) { in xdr_buf_to_bvec()
177 bvec_set_virt(bvec, tail->iov_base, tail->iov_len); in xdr_buf_to_bvec()
204 struct kvec *tail = xdr->tail; in xdr_inline_pages() local
214 tail->iov_base = buf + offset; in xdr_inline_pages()
215 tail->iov_len = buflen - offset; in xdr_inline_pages()
474 xdr_buf_iov_zero(buf->tail, pgbase - buf->page_len, len); in xdr_buf_pages_zero()
478 xdr_buf_iov_zero(buf->tail, 0, pgbase + len - buf->page_len); in xdr_buf_pages_zero()
534 struct kvec *tail = buf->tail; in xdr_buf_try_expand() local
535 unsigned int sum = head->iov_len + buf->page_len + tail->iov_len; in xdr_buf_try_expand()
550 /* Expand the tail buffer */ in xdr_buf_try_expand()
552 tail->iov_len += free_space; in xdr_buf_try_expand()
561 const struct kvec *tail = buf->tail; in xdr_buf_tail_copy_right() local
564 if (to >= tail->iov_len) in xdr_buf_tail_copy_right()
566 if (len + to > tail->iov_len) in xdr_buf_tail_copy_right()
567 len = tail->iov_len - to; in xdr_buf_tail_copy_right()
568 memmove(tail->iov_base + to, tail->iov_base + base, len); in xdr_buf_tail_copy_right()
575 const struct kvec *tail = buf->tail; in xdr_buf_pages_copy_right() local
586 if (tail->iov_len >= len + tato) in xdr_buf_pages_copy_right()
588 else if (tail->iov_len > tato) in xdr_buf_pages_copy_right()
589 talen = tail->iov_len - tato; in xdr_buf_pages_copy_right()
593 if (talen > tail->iov_len) in xdr_buf_pages_copy_right()
594 talen = tail->iov_len; in xdr_buf_pages_copy_right()
598 _copy_from_pages(tail->iov_base + tato, buf->pages, in xdr_buf_pages_copy_right()
609 const struct kvec *tail = buf->tail; in xdr_buf_head_copy_right() local
638 if (talen + tato > tail->iov_len) in xdr_buf_head_copy_right()
639 talen = tail->iov_len > tato ? tail->iov_len - tato : 0; in xdr_buf_head_copy_right()
640 memcpy(tail->iov_base + tato, head->iov_base + base, talen); in xdr_buf_head_copy_right()
655 const struct kvec *tail = buf->tail; in xdr_buf_tail_shift_right() local
657 if (base >= tail->iov_len || !shift || !len) in xdr_buf_tail_shift_right()
700 const struct kvec *tail = buf->tail; in xdr_buf_tail_copy_left() local
702 if (base >= tail->iov_len) in xdr_buf_tail_copy_left()
704 if (len > tail->iov_len - base) in xdr_buf_tail_copy_left()
705 len = tail->iov_len - base; in xdr_buf_tail_copy_left()
718 memcpy(head->iov_base + hdto, tail->iov_base + base, hdlen); in xdr_buf_tail_copy_left()
732 tail->iov_base + base, pglen); in xdr_buf_tail_copy_left()
738 memmove(tail->iov_base + base - shift, tail->iov_base + base, len); in xdr_buf_tail_copy_left()
835 * moved into the inlined pages and/or the tail.
863 * The extra data is not lost, but is instead moved into buf->tail.
941 int scratch_len = buf->buflen - buf->page_len - buf->tail[0].iov_len; in xdr_init_encode()
1149 * head, tail, and page lengths are adjusted to correspond.
1158 * simple case of truncating from one position in the tail to another.
1165 struct kvec *tail = buf->tail; in xdr_truncate_encode() local
1175 fraglen = min_t(int, buf->len - len, tail->iov_len); in xdr_truncate_encode()
1176 tail->iov_len -= fraglen; in xdr_truncate_encode()
1178 if (tail->iov_len) { in xdr_truncate_encode()
1179 xdr->p = tail->iov_base + tail->iov_len; in xdr_truncate_encode()
1262 * After the @pages are added, the tail iovec is instantiated pointing to
1264 * items into the tail.
1270 struct kvec *tail = buf->tail; in xdr_write_pages() local
1276 tail->iov_base = xdr->p; in xdr_write_pages()
1277 tail->iov_len = 0; in xdr_write_pages()
1278 xdr->iov = tail; in xdr_write_pages()
1284 tail->iov_base = (char *)xdr->p + (len & 3); in xdr_write_pages()
1285 tail->iov_len += pad; in xdr_write_pages()
1314 return xdr_set_iov(xdr, buf->tail, base, len); in xdr_set_tail_base()
1412 xdr_set_iov(xdr, buf->tail, 0, buf->len); in xdr_init_decode()
1549 /* Truncate page data and move it into the tail */ in xdr_align_pages()
1563 * bytes is moved into the XDR tail[]. The xdr_stream current position is
1564 * then advanced past that data to align to the next XDR object in the tail.
1591 * @len bytes. When shrinking, any extra data is moved into buf->tail, whereas
1592 * when growing any data beyond the current pointer is moved into the tail.
1622 * bytes is moved into the XDR tail[]. The current pointer is then
1629 * Position current pointer at beginning of tail, and in xdr_enter_page()
1642 buf->tail[0] = empty_iov; in xdr_buf_from_iov()
1692 if (base < buf->tail[0].iov_len) { in xdr_buf_subsegment()
1693 subbuf->tail[0].iov_base = buf->tail[0].iov_base + base; in xdr_buf_subsegment()
1694 subbuf->tail[0].iov_len = min_t(unsigned int, len, in xdr_buf_subsegment()
1695 buf->tail[0].iov_len - base); in xdr_buf_subsegment()
1696 len -= subbuf->tail[0].iov_len; in xdr_buf_subsegment()
1699 base -= buf->tail[0].iov_len; in xdr_buf_subsegment()
1700 subbuf->tail[0].iov_base = buf->tail[0].iov_base; in xdr_buf_subsegment()
1701 subbuf->tail[0].iov_len = 0; in xdr_buf_subsegment()
1805 if (buf.tail[0].iov_len) in xdr_stream_zero()
1806 xdr_buf_iov_zero(buf.tail, 0, buf.tail[0].iov_len); in xdr_stream_zero()
1826 if (buf->tail[0].iov_len) { in xdr_buf_trim()
1827 cur = min_t(size_t, buf->tail[0].iov_len, trim); in xdr_buf_trim()
1828 buf->tail[0].iov_len -= cur; in xdr_buf_trim()
1865 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __read_bytes_from_xdr_buf()
1866 memcpy(obj, subbuf->tail[0].iov_base, this_len); in __read_bytes_from_xdr_buf()
1897 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __write_bytes_to_xdr_buf()
1898 memcpy(subbuf->tail[0].iov_base, obj, this_len); in __write_bytes_to_xdr_buf()
2093 base = buf->page_len; /* align to start of tail */ in xdr_xcode_array2()
2096 /* process tail */ in xdr_xcode_array2()
2099 c = buf->tail->iov_base + base; in xdr_xcode_array2()
2145 buf->head->iov_len + buf->page_len + buf->tail->iov_len) in xdr_encode_array2()
2204 if (offset < buf->tail[0].iov_len) { in xdr_process_buf()
2205 thislen = buf->tail[0].iov_len - offset; in xdr_process_buf()
2208 sg_set_buf(sg, buf->tail[0].iov_base + offset, thislen); in xdr_process_buf()