Lines Matching full:tail

182 	struct kvec *tail = xdr->tail;  in xdr_inline_pages()  local
192 tail->iov_base = buf + offset; in xdr_inline_pages()
193 tail->iov_len = buflen - offset; in xdr_inline_pages()
452 xdr_buf_iov_zero(buf->tail, pgbase - buf->page_len, len); in xdr_buf_pages_zero()
456 xdr_buf_iov_zero(buf->tail, 0, pgbase + len - buf->page_len); in xdr_buf_pages_zero()
512 struct kvec *tail = buf->tail; in xdr_buf_try_expand() local
513 unsigned int sum = head->iov_len + buf->page_len + tail->iov_len; in xdr_buf_try_expand()
528 /* Expand the tail buffer */ in xdr_buf_try_expand()
530 tail->iov_len += free_space; in xdr_buf_try_expand()
539 const struct kvec *tail = buf->tail; in xdr_buf_tail_copy_right() local
542 if (to >= tail->iov_len) in xdr_buf_tail_copy_right()
544 if (len + to > tail->iov_len) in xdr_buf_tail_copy_right()
545 len = tail->iov_len - to; in xdr_buf_tail_copy_right()
546 memmove(tail->iov_base + to, tail->iov_base + base, len); in xdr_buf_tail_copy_right()
553 const struct kvec *tail = buf->tail; in xdr_buf_pages_copy_right() local
564 if (tail->iov_len >= len + tato) in xdr_buf_pages_copy_right()
566 else if (tail->iov_len > tato) in xdr_buf_pages_copy_right()
567 talen = tail->iov_len - tato; in xdr_buf_pages_copy_right()
571 if (talen > tail->iov_len) in xdr_buf_pages_copy_right()
572 talen = tail->iov_len; in xdr_buf_pages_copy_right()
576 _copy_from_pages(tail->iov_base + tato, buf->pages, in xdr_buf_pages_copy_right()
587 const struct kvec *tail = buf->tail; in xdr_buf_head_copy_right() local
616 if (talen + tato > tail->iov_len) in xdr_buf_head_copy_right()
617 talen = tail->iov_len > tato ? tail->iov_len - tato : 0; in xdr_buf_head_copy_right()
618 memcpy(tail->iov_base + tato, head->iov_base + base, talen); in xdr_buf_head_copy_right()
633 const struct kvec *tail = buf->tail; in xdr_buf_tail_shift_right() local
635 if (base >= tail->iov_len || !shift || !len) in xdr_buf_tail_shift_right()
678 const struct kvec *tail = buf->tail; in xdr_buf_tail_copy_left() local
680 if (base >= tail->iov_len) in xdr_buf_tail_copy_left()
682 if (len > tail->iov_len - base) in xdr_buf_tail_copy_left()
683 len = tail->iov_len - base; in xdr_buf_tail_copy_left()
696 memcpy(head->iov_base + hdto, tail->iov_base + base, hdlen); in xdr_buf_tail_copy_left()
710 tail->iov_base + base, pglen); in xdr_buf_tail_copy_left()
716 memmove(tail->iov_base + base - shift, tail->iov_base + base, len); in xdr_buf_tail_copy_left()
813 * moved into the inlined pages and/or the tail.
841 * The extra data is not lost, but is instead moved into buf->tail.
926 int scratch_len = buf->buflen - buf->page_len - buf->tail[0].iov_len; in xdr_init_encode()
1133 * head, tail, and page lengths are adjusted to correspond.
1142 * simple case of truncating from one position in the tail to another.
1149 struct kvec *tail = buf->tail; in xdr_truncate_encode() local
1159 fraglen = min_t(int, buf->len - len, tail->iov_len); in xdr_truncate_encode()
1160 tail->iov_len -= fraglen; in xdr_truncate_encode()
1162 if (tail->iov_len) { in xdr_truncate_encode()
1163 xdr->p = tail->iov_base + tail->iov_len; in xdr_truncate_encode()
1236 struct kvec *iov = buf->tail; in xdr_write_pages()
1279 return xdr_set_iov(xdr, buf->tail, base, len); in xdr_set_tail_base()
1362 xdr_set_iov(xdr, buf->tail, 0, buf->len); in xdr_init_decode()
1489 /* Truncate page data and move it into the tail */ in xdr_align_pages()
1503 * bytes is moved into the XDR tail[]. The xdr_stream current position is
1504 * then advanced past that data to align to the next XDR object in the tail.
1531 * @len bytes. When shrinking, any extra data is moved into buf->tail, whereas
1532 * when growing any data beyond the current pointer is moved into the tail.
1562 * bytes is moved into the XDR tail[]. The current pointer is then
1569 * Position current pointer at beginning of tail, and in xdr_enter_page()
1582 buf->tail[0] = empty_iov; in xdr_buf_from_iov()
1632 if (base < buf->tail[0].iov_len) { in xdr_buf_subsegment()
1633 subbuf->tail[0].iov_base = buf->tail[0].iov_base + base; in xdr_buf_subsegment()
1634 subbuf->tail[0].iov_len = min_t(unsigned int, len, in xdr_buf_subsegment()
1635 buf->tail[0].iov_len - base); in xdr_buf_subsegment()
1636 len -= subbuf->tail[0].iov_len; in xdr_buf_subsegment()
1639 base -= buf->tail[0].iov_len; in xdr_buf_subsegment()
1640 subbuf->tail[0].iov_base = buf->tail[0].iov_base; in xdr_buf_subsegment()
1641 subbuf->tail[0].iov_len = 0; in xdr_buf_subsegment()
1745 if (buf.tail[0].iov_len) in xdr_stream_zero()
1746 xdr_buf_iov_zero(buf.tail, 0, buf.tail[0].iov_len); in xdr_stream_zero()
1766 if (buf->tail[0].iov_len) { in xdr_buf_trim()
1767 cur = min_t(size_t, buf->tail[0].iov_len, trim); in xdr_buf_trim()
1768 buf->tail[0].iov_len -= cur; in xdr_buf_trim()
1805 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __read_bytes_from_xdr_buf()
1806 memcpy(obj, subbuf->tail[0].iov_base, this_len); in __read_bytes_from_xdr_buf()
1837 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __write_bytes_to_xdr_buf()
1838 memcpy(subbuf->tail[0].iov_base, obj, this_len); in __write_bytes_to_xdr_buf()
2033 base = buf->page_len; /* align to start of tail */ in xdr_xcode_array2()
2036 /* process tail */ in xdr_xcode_array2()
2039 c = buf->tail->iov_base + base; in xdr_xcode_array2()
2085 buf->head->iov_len + buf->page_len + buf->tail->iov_len) in xdr_encode_array2()
2144 if (offset < buf->tail[0].iov_len) { in xdr_process_buf()
2145 thislen = buf->tail[0].iov_len - offset; in xdr_process_buf()
2148 sg_set_buf(sg, buf->tail[0].iov_base + offset, thislen); in xdr_process_buf()