Lines Matching refs: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()
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()
968 int scratch_len = buf->buflen - buf->page_len - buf->tail[0].iov_len; in xdr_init_encode()
1189 struct kvec *tail = buf->tail; in xdr_truncate_encode() local
1199 fraglen = min_t(int, buf->len - len, tail->iov_len); in xdr_truncate_encode()
1200 tail->iov_len -= fraglen; in xdr_truncate_encode()
1202 if (tail->iov_len) { in xdr_truncate_encode()
1203 xdr->p = tail->iov_base + tail->iov_len; in xdr_truncate_encode()
1294 struct kvec *tail = buf->tail; in xdr_write_pages() local
1300 tail->iov_base = xdr->p; in xdr_write_pages()
1301 tail->iov_len = 0; in xdr_write_pages()
1302 xdr->iov = tail; in xdr_write_pages()
1308 tail->iov_base = (char *)xdr->p + (len & 3); in xdr_write_pages()
1309 tail->iov_len += pad; in xdr_write_pages()
1338 return xdr_set_iov(xdr, buf->tail, base, len); in xdr_set_tail_base()
1436 xdr_set_iov(xdr, buf->tail, 0, buf->len); in xdr_init_decode()
1666 buf->tail[0] = empty_iov; in xdr_buf_from_iov()
1716 if (base < buf->tail[0].iov_len) { in xdr_buf_subsegment()
1717 subbuf->tail[0].iov_base = buf->tail[0].iov_base + base; in xdr_buf_subsegment()
1718 subbuf->tail[0].iov_len = min_t(unsigned int, len, in xdr_buf_subsegment()
1719 buf->tail[0].iov_len - base); in xdr_buf_subsegment()
1720 len -= subbuf->tail[0].iov_len; in xdr_buf_subsegment()
1723 base -= buf->tail[0].iov_len; in xdr_buf_subsegment()
1724 subbuf->tail[0].iov_base = buf->tail[0].iov_base; in xdr_buf_subsegment()
1725 subbuf->tail[0].iov_len = 0; in xdr_buf_subsegment()
1829 if (buf.tail[0].iov_len) in xdr_stream_zero()
1830 xdr_buf_iov_zero(buf.tail, 0, buf.tail[0].iov_len); in xdr_stream_zero()
1850 if (buf->tail[0].iov_len) { in xdr_buf_trim()
1851 cur = min_t(size_t, buf->tail[0].iov_len, trim); in xdr_buf_trim()
1852 buf->tail[0].iov_len -= cur; in xdr_buf_trim()
1889 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __read_bytes_from_xdr_buf()
1890 memcpy(obj, subbuf->tail[0].iov_base, this_len); in __read_bytes_from_xdr_buf()
1921 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __write_bytes_to_xdr_buf()
1922 memcpy(subbuf->tail[0].iov_base, obj, this_len); in __write_bytes_to_xdr_buf()
2123 c = buf->tail->iov_base + base; in xdr_xcode_array2()
2169 buf->head->iov_len + buf->page_len + buf->tail->iov_len) in xdr_encode_array2()
2228 if (offset < buf->tail[0].iov_len) { in xdr_process_buf()
2229 thislen = buf->tail[0].iov_len - offset; in xdr_process_buf()
2232 sg_set_buf(sg, buf->tail[0].iov_base + offset, thislen); in xdr_process_buf()