• Home
  • Raw
  • Download

Lines Matching refs:iov_len

186 	unsigned int buflen = head->iov_len;  in xdr_inline_pages()
188 head->iov_len = 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()
274 if (len > tail->iov_len) in _shift_data_left_tail()
275 len = tail->iov_len; 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()
286 tail->iov_len); in _shift_data_left_tail()
362 tailbuf_len = buf->buflen - buf->head->iov_len - buf->page_len; 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()
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()
531 WARN_ON_ONCE(len > head->iov_len); in xdr_shrink_bufhead()
532 if (len > head->iov_len) in xdr_shrink_bufhead()
533 len = head->iov_len; 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()
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()
562 if (copy > tail->iov_len) in xdr_shrink_bufhead()
563 copy = tail->iov_len; in xdr_shrink_bufhead()
566 head->iov_len - offs, in xdr_shrink_bufhead()
582 (char *)head->iov_base + head->iov_len - len, in xdr_shrink_bufhead()
586 head->iov_len -= len; in xdr_shrink_bufhead()
647 WARN_ON(pos < xdr->buf->head[0].iov_len); in xdr_page_pos()
648 return pos - xdr->buf->head[0].iov_len; in xdr_page_pos()
670 int scratch_len = buf->buflen - buf->page_len - buf->tail[0].iov_len; in xdr_init_encode()
676 xdr->p = (__be32 *)((char *)iov->iov_base + iov->iov_len); in xdr_init_encode()
678 BUG_ON(iov->iov_len > scratch_len); in xdr_init_encode()
687 iov->iov_len += len; in xdr_init_encode()
708 int shift = xdr->scratch.iov_len; in xdr_commit_encode()
716 xdr->scratch.iov_len = 0; in xdr_commit_encode()
734 xdr->iov->iov_len += frag1bytes; in xdr_get_next_encode_buffer()
747 xdr->scratch.iov_len = frag1bytes; in xdr_get_next_encode_buffer()
791 xdr->iov->iov_len += nbytes; in xdr_reserve_space()
835 vec[v].iov_len = thislen; in xdr_reserve_space_vec()
877 fraglen = min_t(int, buf->len - len, tail->iov_len); in xdr_truncate_encode()
878 tail->iov_len -= fraglen; in xdr_truncate_encode()
880 if (tail->iov_len) { in xdr_truncate_encode()
881 xdr->p = tail->iov_base + tail->iov_len; in xdr_truncate_encode()
903 xdr->end = head->iov_base + head->iov_len; in xdr_truncate_encode()
906 head->iov_len = len; in xdr_truncate_encode()
908 xdr->p = head->iov_base + head->iov_len; in xdr_truncate_encode()
960 iov->iov_len = 0; in xdr_write_pages()
968 iov->iov_len += pad; in xdr_write_pages()
980 if (len > iov->iov_len) in xdr_set_iov()
981 len = iov->iov_len; in xdr_set_iov()
1060 xdr->scratch.iov_len = 0; in xdr_init_decode()
1062 if (buf->head[0].iov_len != 0) in xdr_init_decode()
1122 xdr->scratch.iov_len = buflen; in xdr_set_scratch_buffer()
1132 if (nbytes > xdr->scratch.iov_len) in xdr_copy_to_scratch()
1188 if (iov->iov_len > cur) { in xdr_realign_pages()
1189 offset = iov->iov_len - cur; in xdr_realign_pages()
1250 if (end > iov->iov_len) in xdr_read_pages()
1251 end = iov->iov_len; in xdr_read_pages()
1360 static const struct kvec empty_iov = {.iov_base = NULL, .iov_len = 0};
1368 buf->buflen = buf->len = iov->iov_len; in xdr_buf_from_iov()
1391 if (base < buf->head[0].iov_len) { in xdr_buf_subsegment()
1393 subbuf->head[0].iov_len = min_t(unsigned int, len, in xdr_buf_subsegment()
1394 buf->head[0].iov_len - base); in xdr_buf_subsegment()
1395 len -= subbuf->head[0].iov_len; in xdr_buf_subsegment()
1398 base -= buf->head[0].iov_len; in xdr_buf_subsegment()
1400 subbuf->head[0].iov_len = 0; in xdr_buf_subsegment()
1417 if (base < buf->tail[0].iov_len) { in xdr_buf_subsegment()
1419 subbuf->tail[0].iov_len = min_t(unsigned int, len, in xdr_buf_subsegment()
1420 buf->tail[0].iov_len - base); in xdr_buf_subsegment()
1421 len -= subbuf->tail[0].iov_len; in xdr_buf_subsegment()
1424 base -= buf->tail[0].iov_len; in xdr_buf_subsegment()
1426 subbuf->tail[0].iov_len = 0; in xdr_buf_subsegment()
1450 if (buf->tail[0].iov_len) { in xdr_buf_trim()
1451 cur = min_t(size_t, buf->tail[0].iov_len, trim); in xdr_buf_trim()
1452 buf->tail[0].iov_len -= cur; in xdr_buf_trim()
1466 if (buf->head[0].iov_len) { in xdr_buf_trim()
1467 cur = min_t(size_t, buf->head[0].iov_len, trim); in xdr_buf_trim()
1468 buf->head[0].iov_len -= cur; in xdr_buf_trim()
1480 this_len = min_t(unsigned int, len, subbuf->head[0].iov_len); in __read_bytes_from_xdr_buf()
1489 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __read_bytes_from_xdr_buf()
1511 this_len = min_t(unsigned int, len, subbuf->head[0].iov_len); in __write_bytes_to_xdr_buf()
1520 this_len = min_t(unsigned int, len, subbuf->tail[0].iov_len); in __write_bytes_to_xdr_buf()
1589 if (todo && base < buf->head->iov_len) { in xdr_xcode_array2()
1592 buf->head->iov_len - base); in xdr_xcode_array2()
1618 base = buf->head->iov_len; /* align to start of pages */ in xdr_xcode_array2()
1622 base -= buf->head->iov_len; in xdr_xcode_array2()
1772 buf->head->iov_len + buf->page_len + buf->tail->iov_len) in xdr_encode_array2()
1789 if (offset >= buf->head[0].iov_len) { in xdr_process_buf()
1790 offset -= buf->head[0].iov_len; in xdr_process_buf()
1792 thislen = buf->head[0].iov_len - offset; in xdr_process_buf()
1831 if (offset < buf->tail[0].iov_len) { in xdr_process_buf()
1832 thislen = buf->tail[0].iov_len - offset; in xdr_process_buf()