Lines Matching full:tail
179 const struct kvec *tail = xdr->tail; in xdr_buf_to_bvec() local
204 if (tail->iov_len) { in xdr_buf_to_bvec()
205 bvec_set_virt(bvec, tail->iov_base, tail->iov_len); in xdr_buf_to_bvec()
231 struct kvec *tail = xdr->tail; in xdr_inline_pages() local
241 tail->iov_base = buf + offset; in xdr_inline_pages()
242 tail->iov_len = buflen - offset; in xdr_inline_pages()
501 xdr_buf_iov_zero(buf->tail, pgbase - buf->page_len, len); in xdr_buf_pages_zero()
505 xdr_buf_iov_zero(buf->tail, 0, pgbase + len - buf->page_len); in xdr_buf_pages_zero()
561 struct kvec *tail = buf->tail; in xdr_buf_try_expand() local
562 unsigned int sum = head->iov_len + buf->page_len + tail->iov_len; in xdr_buf_try_expand()
577 /* Expand the tail buffer */ in xdr_buf_try_expand()
579 tail->iov_len += free_space; in xdr_buf_try_expand()
588 const struct kvec *tail = buf->tail; in xdr_buf_tail_copy_right() local
591 if (to >= tail->iov_len) in xdr_buf_tail_copy_right()
593 if (len + to > tail->iov_len) in xdr_buf_tail_copy_right()
594 len = tail->iov_len - to; in xdr_buf_tail_copy_right()
595 memmove(tail->iov_base + to, tail->iov_base + base, len); in xdr_buf_tail_copy_right()
602 const struct kvec *tail = buf->tail; in xdr_buf_pages_copy_right() local
613 if (tail->iov_len >= len + tato) in xdr_buf_pages_copy_right()
615 else if (tail->iov_len > tato) in xdr_buf_pages_copy_right()
616 talen = tail->iov_len - tato; in xdr_buf_pages_copy_right()
620 if (talen > tail->iov_len) in xdr_buf_pages_copy_right()
621 talen = tail->iov_len; in xdr_buf_pages_copy_right()
625 _copy_from_pages(tail->iov_base + tato, buf->pages, in xdr_buf_pages_copy_right()
636 const struct kvec *tail = buf->tail; in xdr_buf_head_copy_right() local
665 if (talen + tato > tail->iov_len) in xdr_buf_head_copy_right()
666 talen = tail->iov_len > tato ? tail->iov_len - tato : 0; in xdr_buf_head_copy_right()
667 memcpy(tail->iov_base + tato, head->iov_base + base, talen); in xdr_buf_head_copy_right()
682 const struct kvec *tail = buf->tail; in xdr_buf_tail_shift_right() local
684 if (base >= tail->iov_len || !shift || !len) in xdr_buf_tail_shift_right()
727 const struct kvec *tail = buf->tail; in xdr_buf_tail_copy_left() local
729 if (base >= tail->iov_len) in xdr_buf_tail_copy_left()
731 if (len > tail->iov_len - base) in xdr_buf_tail_copy_left()
732 len = tail->iov_len - base; in xdr_buf_tail_copy_left()
745 memcpy(head->iov_base + hdto, tail->iov_base + base, hdlen); in xdr_buf_tail_copy_left()
759 tail->iov_base + base, pglen); in xdr_buf_tail_copy_left()
765 memmove(tail->iov_base + base - shift, tail->iov_base + base, len); in xdr_buf_tail_copy_left()
862 * moved into the inlined pages and/or the tail.
890 * The extra data is not lost, but is instead moved into buf->tail.
968 int scratch_len = buf->buflen - buf->page_len - buf->tail[0].iov_len; in xdr_init_encode()
1179 * head, tail, and page lengths are adjusted to correspond.
1188 * simple case of truncating from one position in the tail to another.
1195 struct kvec *tail = buf->tail; in xdr_truncate_encode() local
1205 fraglen = min_t(int, buf->len - len, tail->iov_len); in xdr_truncate_encode()
1206 tail->iov_len -= fraglen; in xdr_truncate_encode()
1208 if (tail->iov_len) { in xdr_truncate_encode()
1209 xdr->p = tail->iov_base + tail->iov_len; in xdr_truncate_encode()
1292 * After the @pages are added, the tail iovec is instantiated pointing to
1294 * items into the tail.
1300 struct kvec *tail = buf->tail; in xdr_write_pages() local
1306 tail->iov_base = xdr->p; in xdr_write_pages()
1307 tail->iov_len = 0; in xdr_write_pages()
1308 xdr->iov = tail; in xdr_write_pages()
1314 tail->iov_base = (char *)xdr->p + (len & 3); in xdr_write_pages()
1315 tail->iov_len += pad; in xdr_write_pages()
1344 return xdr_set_iov(xdr, buf->tail, base, len); in xdr_set_tail_base()
1442 xdr_set_iov(xdr, buf->tail, 0, buf->len); in xdr_init_decode()
1579 /* Truncate page data and move it into the tail */ in xdr_align_pages()
1593 * bytes is moved into the XDR tail[]. The xdr_stream current position is
1594 * then advanced past that data to align to the next XDR object in the tail.
1621 * @len bytes. When shrinking, any extra data is moved into buf->tail, whereas
1622 * when growing any data beyond the current pointer is moved into the tail.
1652 * bytes is moved into the XDR tail[]. The current pointer is then
1659 * Position current pointer at beginning of tail, and in xdr_enter_page()
1672 buf->tail[0] = empty_iov; in xdr_buf_from_iov()
1722 if (base < buf->tail[0].iov_len) { in xdr_buf_subsegment()
1723 subbuf->tail[0].iov_base = buf->tail[0].iov_base + base; in xdr_buf_subsegment()
1724 subbuf->tail[0].iov_len = min_t(unsigned int, len, in xdr_buf_subsegment()
1725 buf->tail[0].iov_len - base); in xdr_buf_subsegment()
1726 len -= subbuf->tail[0].iov_len; in xdr_buf_subsegment()
1729 base -= buf->tail[0].iov_len; in xdr_buf_subsegment()
1730 subbuf->tail[0].iov_base = buf->tail[0].iov_base; in xdr_buf_subsegment()
1731 subbuf->tail[0].iov_len = 0; in xdr_buf_subsegment()
1835 if (buf.tail[0].iov_len) in xdr_stream_zero()
1836 xdr_buf_iov_zero(buf.tail, 0, buf.tail[0].iov_len); in xdr_stream_zero()
1856 if (buf->tail[0].iov_len) { in xdr_buf_trim()
1857 cur = min_t(size_t, buf->tail[0].iov_len, trim); in xdr_buf_trim()
1858 buf->tail[0].iov_len -= cur; in xdr_buf_trim()
1895 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __read_bytes_from_xdr_buf()
1896 memcpy(obj, subbuf->tail[0].iov_base, this_len); in __read_bytes_from_xdr_buf()
1927 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __write_bytes_to_xdr_buf()
1928 memcpy(subbuf->tail[0].iov_base, obj, this_len); in __write_bytes_to_xdr_buf()
2123 base = buf->page_len; /* align to start of tail */ in xdr_xcode_array2()
2126 /* process tail */ in xdr_xcode_array2()
2129 c = buf->tail->iov_base + base; in xdr_xcode_array2()
2175 buf->head->iov_len + buf->page_len + buf->tail->iov_len) in xdr_encode_array2()
2234 if (offset < buf->tail[0].iov_len) { in xdr_process_buf()
2235 thislen = buf->tail[0].iov_len - offset; in xdr_process_buf()
2238 sg_set_buf(sg, buf->tail[0].iov_base + offset, thislen); in xdr_process_buf()