Lines Matching refs: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()
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()
898 int scratch_len = buf->buflen - buf->page_len - buf->tail[0].iov_len; in xdr_init_encode()
1090 struct kvec *tail = buf->tail; in xdr_truncate_encode() local
1100 fraglen = min_t(int, buf->len - len, tail->iov_len); in xdr_truncate_encode()
1101 tail->iov_len -= fraglen; in xdr_truncate_encode()
1103 if (tail->iov_len) { in xdr_truncate_encode()
1104 xdr->p = tail->iov_base + tail->iov_len; in xdr_truncate_encode()
1177 struct kvec *iov = buf->tail; in xdr_write_pages()
1220 return xdr_set_iov(xdr, buf->tail, base, len); in xdr_set_tail_base()
1303 xdr_set_iov(xdr, buf->tail, 0, buf->len); in xdr_init_decode()
1476 if (from >= buf->page_len + buf->tail->iov_len) in xdr_align_data()
1559 buf->tail[0] = empty_iov; in xdr_buf_from_iov()
1609 if (base < buf->tail[0].iov_len) { in xdr_buf_subsegment()
1610 subbuf->tail[0].iov_base = buf->tail[0].iov_base + base; in xdr_buf_subsegment()
1611 subbuf->tail[0].iov_len = min_t(unsigned int, len, in xdr_buf_subsegment()
1612 buf->tail[0].iov_len - base); in xdr_buf_subsegment()
1613 len -= subbuf->tail[0].iov_len; in xdr_buf_subsegment()
1616 base -= buf->tail[0].iov_len; in xdr_buf_subsegment()
1617 subbuf->tail[0].iov_base = buf->tail[0].iov_base; in xdr_buf_subsegment()
1618 subbuf->tail[0].iov_len = 0; in xdr_buf_subsegment()
1689 if (buf->tail[0].iov_len) { in xdr_buf_trim()
1690 cur = min_t(size_t, buf->tail[0].iov_len, trim); in xdr_buf_trim()
1691 buf->tail[0].iov_len -= cur; in xdr_buf_trim()
1728 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __read_bytes_from_xdr_buf()
1729 memcpy(obj, subbuf->tail[0].iov_base, this_len); in __read_bytes_from_xdr_buf()
1760 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __write_bytes_to_xdr_buf()
1761 memcpy(subbuf->tail[0].iov_base, obj, this_len); in __write_bytes_to_xdr_buf()
1962 c = buf->tail->iov_base + base; in xdr_xcode_array2()
2008 buf->head->iov_len + buf->page_len + buf->tail->iov_len) in xdr_encode_array2()
2067 if (offset < buf->tail[0].iov_len) { in xdr_process_buf()
2068 thislen = buf->tail[0].iov_len - offset; in xdr_process_buf()
2071 sg_set_buf(sg, buf->tail[0].iov_base + offset, thislen); in xdr_process_buf()