Lines Matching refs:tail
179 const struct kvec *tail = xdr->tail;
204 if (tail->iov_len) {
205 bvec_set_virt(bvec, tail->iov_base, tail->iov_len);
231 struct kvec *tail = xdr->tail;
241 tail->iov_base = buf + offset;
242 tail->iov_len = buflen - offset;
501 xdr_buf_iov_zero(buf->tail, pgbase - buf->page_len, len);
505 xdr_buf_iov_zero(buf->tail, 0, pgbase + len - buf->page_len);
561 struct kvec *tail = buf->tail;
562 unsigned int sum = head->iov_len + buf->page_len + tail->iov_len;
577 /* Expand the tail buffer */
579 tail->iov_len += free_space;
588 const struct kvec *tail = buf->tail;
591 if (to >= tail->iov_len)
593 if (len + to > tail->iov_len)
594 len = tail->iov_len - to;
595 memmove(tail->iov_base + to, tail->iov_base + base, len);
602 const struct kvec *tail = buf->tail;
613 if (tail->iov_len >= len + tato)
615 else if (tail->iov_len > tato)
616 talen = tail->iov_len - tato;
620 if (talen > tail->iov_len)
621 talen = tail->iov_len;
625 _copy_from_pages(tail->iov_base + tato, buf->pages,
636 const struct kvec *tail = buf->tail;
665 if (talen + tato > tail->iov_len)
666 talen = tail->iov_len > tato ? tail->iov_len - tato : 0;
667 memcpy(tail->iov_base + tato, head->iov_base + base, talen);
682 const struct kvec *tail = buf->tail;
684 if (base >= tail->iov_len || !shift || !len)
727 const struct kvec *tail = buf->tail;
729 if (base >= tail->iov_len)
731 if (len > tail->iov_len - base)
732 len = tail->iov_len - base;
745 memcpy(head->iov_base + hdto, tail->iov_base + base, hdlen);
759 tail->iov_base + base, pglen);
765 memmove(tail->iov_base + base - shift, tail->iov_base + base, len);
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;
1173 * head, tail, and page lengths are adjusted to correspond.
1182 * simple case of truncating from one position in the tail to another.
1189 struct kvec *tail = buf->tail;
1199 fraglen = min_t(int, buf->len - len, tail->iov_len);
1200 tail->iov_len -= fraglen;
1202 if (tail->iov_len) {
1203 xdr->p = tail->iov_base + tail->iov_len;
1286 * After the @pages are added, the tail iovec is instantiated pointing to
1288 * items into the tail.
1294 struct kvec *tail = buf->tail;
1300 tail->iov_base = xdr->p;
1301 tail->iov_len = 0;
1302 xdr->iov = tail;
1308 tail->iov_base = (char *)xdr->p + (len & 3);
1309 tail->iov_len += pad;
1338 return xdr_set_iov(xdr, buf->tail, base, len);
1436 xdr_set_iov(xdr, buf->tail, 0, buf->len);
1573 /* Truncate page data and move it into the tail */
1587 * bytes is moved into the XDR tail[]. The xdr_stream current position is
1588 * then advanced past that data to align to the next XDR object in the tail.
1615 * @len bytes. When shrinking, any extra data is moved into buf->tail, whereas
1616 * when growing any data beyond the current pointer is moved into the tail.
1646 * bytes is moved into the XDR tail[]. The current pointer is then
1653 * Position current pointer at beginning of tail, and
1666 buf->tail[0] = empty_iov;
1716 if (base < buf->tail[0].iov_len) {
1717 subbuf->tail[0].iov_base = buf->tail[0].iov_base + base;
1718 subbuf->tail[0].iov_len = min_t(unsigned int, len,
1719 buf->tail[0].iov_len - base);
1720 len -= subbuf->tail[0].iov_len;
1723 base -= buf->tail[0].iov_len;
1724 subbuf->tail[0].iov_base = buf->tail[0].iov_base;
1725 subbuf->tail[0].iov_len = 0;
1829 if (buf.tail[0].iov_len)
1830 xdr_buf_iov_zero(buf.tail, 0, buf.tail[0].iov_len);
1850 if (buf->tail[0].iov_len) {
1851 cur = min_t(size_t, buf->tail[0].iov_len, trim);
1852 buf->tail[0].iov_len -= cur;
1889 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len);
1890 memcpy(obj, subbuf->tail[0].iov_base, this_len);
1921 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len);
1922 memcpy(subbuf->tail[0].iov_base, obj, this_len);
2117 base = buf->page_len; /* align to start of tail */
2120 /* process tail */
2123 c = buf->tail->iov_base + base;
2169 buf->head->iov_len + buf->page_len + buf->tail->iov_len)
2228 if (offset < buf->tail[0].iov_len) {
2229 thislen = buf->tail[0].iov_len - offset;
2232 sg_set_buf(sg, buf->tail[0].iov_base + offset, thislen);