• Home
  • Raw
  • Download

Lines Matching full:tail

184 	struct kvec *tail = xdr->tail;  in xdr_inline_pages()  local
194 tail->iov_base = buf + offset; in xdr_inline_pages()
195 tail->iov_len = buflen - offset; in xdr_inline_pages()
197 tail->iov_len -= sizeof(__be32); in xdr_inline_pages()
272 struct kvec *tail = buf->tail; in _shift_data_left_tail() local
274 if (len > tail->iov_len) in _shift_data_left_tail()
275 len = tail->iov_len; in _shift_data_left_tail()
279 (char *)tail->iov_base, in _shift_data_left_tail()
281 tail->iov_len -= len; in _shift_data_left_tail()
283 if (tail->iov_len > 0) in _shift_data_left_tail()
284 memmove((char *)tail->iov_base, in _shift_data_left_tail()
285 tail->iov_base + len, in _shift_data_left_tail()
286 tail->iov_len); in _shift_data_left_tail()
357 struct kvec *tail = buf->tail; in _shift_data_right_tail() local
364 /* Shift the tail first */ in _shift_data_right_tail()
366 unsigned int free_space = tailbuf_len - tail->iov_len; in _shift_data_right_tail()
373 tail->iov_len += free_space; in _shift_data_right_tail()
376 if (tail->iov_len > len) { in _shift_data_right_tail()
377 char *p = (char *)tail->iov_base + len; in _shift_data_right_tail()
378 memmove(p, tail->iov_base, tail->iov_len - free_space); in _shift_data_right_tail()
379 result += tail->iov_len - free_space; in _shift_data_right_tail()
381 copy = tail->iov_len; in _shift_data_right_tail()
383 /* Copy from the inlined pages into the tail */ in _shift_data_right_tail()
384 _copy_from_pages((char *)tail->iov_base, in _shift_data_right_tail()
517 * moved into the inlined pages and/or the tail.
522 struct kvec *head, *tail; in xdr_shrink_bufhead() local
528 tail = buf->tail; in xdr_shrink_bufhead()
535 /* Shift the tail first */ in xdr_shrink_bufhead()
536 if (tail->iov_len != 0) { in xdr_shrink_bufhead()
537 if (tail->iov_len > len) { in xdr_shrink_bufhead()
538 copy = tail->iov_len - len; in xdr_shrink_bufhead()
539 memmove((char *)tail->iov_base + len, in xdr_shrink_bufhead()
540 tail->iov_base, copy); in xdr_shrink_bufhead()
543 /* Copy from the inlined pages into the tail */ in xdr_shrink_bufhead()
548 if (offs >= tail->iov_len) in xdr_shrink_bufhead()
550 else if (copy > tail->iov_len - offs) in xdr_shrink_bufhead()
551 copy = tail->iov_len - offs; in xdr_shrink_bufhead()
553 _copy_from_pages((char *)tail->iov_base + offs, in xdr_shrink_bufhead()
559 /* Do we also need to copy data from the head into the tail ? */ in xdr_shrink_bufhead()
562 if (copy > tail->iov_len) in xdr_shrink_bufhead()
563 copy = tail->iov_len; in xdr_shrink_bufhead()
564 memcpy(tail->iov_base, in xdr_shrink_bufhead()
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; in xdr_init_encode()
847 * head, tail, and page lengths are adjusted to correspond.
856 * simple case of truncating from one position in the tail to another.
863 struct kvec *tail = buf->tail; in xdr_truncate_encode() local
873 fraglen = min_t(int, buf->len - len, tail->iov_len); in xdr_truncate_encode()
874 tail->iov_len -= fraglen; in xdr_truncate_encode()
876 if (tail->iov_len) { in xdr_truncate_encode()
877 xdr->p = tail->iov_base + tail->iov_len; in xdr_truncate_encode()
950 struct kvec *iov = buf->tail; in xdr_write_pages()
1021 xdr_set_iov(xdr, xdr->buf->tail, xdr->nwords << 2); in xdr_set_page()
1210 /* Truncate page data and move it into the tail */ in xdr_align_pages()
1226 * bytes is moved into the XDR tail[].
1243 xdr->iov = iov = buf->tail; in xdr_read_pages()
1250 * Position current pointer at beginning of tail, and in xdr_read_pages()
1286 /* Move tail data into the pages, if necessary */ in xdr_align_data()
1341 * bytes is moved into the XDR tail[]. The current pointer is then
1348 * Position current pointer at beginning of tail, and in xdr_enter_page()
1362 buf->tail[0] = empty_iov; in xdr_buf_from_iov()
1413 if (base < buf->tail[0].iov_len) { in xdr_buf_subsegment()
1414 subbuf->tail[0].iov_base = buf->tail[0].iov_base + base; in xdr_buf_subsegment()
1415 subbuf->tail[0].iov_len = min_t(unsigned int, len, in xdr_buf_subsegment()
1416 buf->tail[0].iov_len - base); in xdr_buf_subsegment()
1417 len -= subbuf->tail[0].iov_len; in xdr_buf_subsegment()
1420 base -= buf->tail[0].iov_len; in xdr_buf_subsegment()
1421 subbuf->tail[0].iov_base = buf->tail[0].iov_base; in xdr_buf_subsegment()
1422 subbuf->tail[0].iov_len = 0; in xdr_buf_subsegment()
1446 if (buf->tail[0].iov_len) { in xdr_buf_trim()
1447 cur = min_t(size_t, buf->tail[0].iov_len, trim); in xdr_buf_trim()
1448 buf->tail[0].iov_len -= cur; in xdr_buf_trim()
1485 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __read_bytes_from_xdr_buf()
1486 memcpy(obj, subbuf->tail[0].iov_base, this_len); in __read_bytes_from_xdr_buf()
1516 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __write_bytes_to_xdr_buf()
1517 memcpy(subbuf->tail[0].iov_base, obj, this_len); in __write_bytes_to_xdr_buf()
1714 base = buf->page_len; /* align to start of tail */ in xdr_xcode_array2()
1717 /* process tail */ in xdr_xcode_array2()
1720 c = buf->tail->iov_base + base; in xdr_xcode_array2()
1768 buf->head->iov_len + buf->page_len + buf->tail->iov_len) in xdr_encode_array2()
1827 if (offset < buf->tail[0].iov_len) { in xdr_process_buf()
1828 thislen = buf->tail[0].iov_len - offset; in xdr_process_buf()
1831 sg_set_buf(sg, buf->tail[0].iov_base + offset, thislen); in xdr_process_buf()