Lines Matching refs:tail

184 	struct kvec *tail = xdr->tail;
194 tail->iov_base = buf + offset;
195 tail->iov_len = buflen - offset;
197 tail->iov_len -= sizeof(__be32);
272 struct kvec *tail = buf->tail;
274 if (len > tail->iov_len)
275 len = tail->iov_len;
279 (char *)tail->iov_base,
281 tail->iov_len -= len;
283 if (tail->iov_len > 0)
284 memmove((char *)tail->iov_base,
285 tail->iov_base + len,
286 tail->iov_len);
357 struct kvec *tail = buf->tail;
364 /* Shift the tail first */
366 unsigned int free_space = tailbuf_len - tail->iov_len;
373 tail->iov_len += free_space;
376 if (tail->iov_len > len) {
377 char *p = (char *)tail->iov_base + len;
378 memmove(p, tail->iov_base, tail->iov_len - free_space);
379 result += tail->iov_len - free_space;
381 copy = tail->iov_len;
383 /* Copy from the inlined pages into the tail */
384 _copy_from_pages((char *)tail->iov_base,
517 * moved into the inlined pages and/or the tail.
522 struct kvec *head, *tail;
528 tail = buf->tail;
535 /* Shift the tail first */
536 if (tail->iov_len != 0) {
537 if (tail->iov_len > len) {
538 copy = tail->iov_len - len;
539 memmove((char *)tail->iov_base + len,
540 tail->iov_base, copy);
543 /* Copy from the inlined pages into the tail */
548 if (offs >= tail->iov_len)
550 else if (copy > tail->iov_len - offs)
551 copy = tail->iov_len - offs;
553 _copy_from_pages((char *)tail->iov_base + offs,
559 /* Do we also need to copy data from the head into the tail ? */
562 if (copy > tail->iov_len)
563 copy = tail->iov_len;
564 memcpy(tail->iov_base,
600 * The extra data is not lost, but is instead moved into buf->tail.
670 int scratch_len = buf->buflen - buf->page_len - buf->tail[0].iov_len;
851 * head, tail, and page lengths are adjusted to correspond.
860 * simple case of truncating from one position in the tail to another.
867 struct kvec *tail = buf->tail;
877 fraglen = min_t(int, buf->len - len, tail->iov_len);
878 tail->iov_len -= fraglen;
880 if (tail->iov_len) {
881 xdr->p = tail->iov_base + tail->iov_len;
954 struct kvec *iov = buf->tail;
1025 xdr_set_iov(xdr, xdr->buf->tail, xdr->nwords << 2);
1214 /* Truncate page data and move it into the tail */
1230 * bytes is moved into the XDR tail[].
1247 xdr->iov = iov = buf->tail;
1254 * Position current pointer at beginning of tail, and
1290 /* Move tail data into the pages, if necessary */
1345 * bytes is moved into the XDR tail[]. The current pointer is then
1352 * Position current pointer at beginning of tail, and
1366 buf->tail[0] = empty_iov;
1417 if (base < buf->tail[0].iov_len) {
1418 subbuf->tail[0].iov_base = buf->tail[0].iov_base + base;
1419 subbuf->tail[0].iov_len = min_t(unsigned int, len,
1420 buf->tail[0].iov_len - base);
1421 len -= subbuf->tail[0].iov_len;
1424 base -= buf->tail[0].iov_len;
1425 subbuf->tail[0].iov_base = buf->tail[0].iov_base;
1426 subbuf->tail[0].iov_len = 0;
1450 if (buf->tail[0].iov_len) {
1451 cur = min_t(size_t, buf->tail[0].iov_len, trim);
1452 buf->tail[0].iov_len -= cur;
1489 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len);
1490 memcpy(obj, subbuf->tail[0].iov_base, this_len);
1520 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len);
1521 memcpy(subbuf->tail[0].iov_base, obj, this_len);
1718 base = buf->page_len; /* align to start of tail */
1721 /* process tail */
1724 c = buf->tail->iov_base + base;
1772 buf->head->iov_len + buf->page_len + buf->tail->iov_len)
1831 if (offset < buf->tail[0].iov_len) {
1832 thislen = buf->tail[0].iov_len - offset;
1835 sg_set_buf(sg, buf->tail[0].iov_base + offset, thislen);