• Home
  • Raw
  • Download

Lines Matching refs:page_len

138 	if (!buf->page_len)  in xdr_buf_pagecount()
140 return (buf->page_base + buf->page_len + PAGE_SIZE - 1) >> PAGE_SHIFT; in xdr_buf_pagecount()
190 xdr->page_len = len; in xdr_inline_pages()
451 if (pgbase >= buf->page_len) { in xdr_buf_pages_zero()
452 xdr_buf_iov_zero(buf->tail, pgbase - buf->page_len, len); in xdr_buf_pages_zero()
455 if (pgbase + len > buf->page_len) { in xdr_buf_pages_zero()
456 xdr_buf_iov_zero(buf->tail, 0, pgbase + len - buf->page_len); in xdr_buf_pages_zero()
457 len = buf->page_len - pgbase; in xdr_buf_pages_zero()
491 if (pagelen > buf->page_len) in xdr_buf_pages_fill_sparse()
492 pagelen = buf->page_len; in xdr_buf_pages_fill_sparse()
513 unsigned int sum = head->iov_len + buf->page_len + tail->iov_len; in xdr_buf_try_expand()
558 if (base >= buf->page_len) in xdr_buf_pages_copy_right()
560 if (len > buf->page_len - base) in xdr_buf_pages_copy_right()
561 len = buf->page_len - base; in xdr_buf_pages_copy_right()
562 if (to >= buf->page_len) { in xdr_buf_pages_copy_right()
563 tato = to - buf->page_len; in xdr_buf_pages_copy_right()
568 } else if (len + to >= buf->page_len) { in xdr_buf_pages_copy_right()
569 pglen = buf->page_len - to; in xdr_buf_pages_copy_right()
596 if (to >= buf->page_len + head->iov_len) { in xdr_buf_head_copy_right()
597 tato = to - buf->page_len - head->iov_len; in xdr_buf_head_copy_right()
602 if (pgto + pglen > buf->page_len) { in xdr_buf_head_copy_right()
603 talen = pgto + pglen - buf->page_len; in xdr_buf_head_copy_right()
608 if (pglen > buf->page_len) { in xdr_buf_head_copy_right()
609 talen = pglen - buf->page_len; in xdr_buf_head_copy_right()
610 pglen = buf->page_len; in xdr_buf_head_copy_right()
646 if (base >= buf->page_len) { in xdr_buf_pages_shift_right()
647 xdr_buf_tail_shift_right(buf, base - buf->page_len, len, shift); in xdr_buf_pages_shift_right()
650 if (base + len > buf->page_len) in xdr_buf_pages_shift_right()
651 xdr_buf_tail_shift_right(buf, 0, base + len - buf->page_len, in xdr_buf_pages_shift_right()
685 if (shift > buf->page_len + base) { in xdr_buf_tail_copy_left()
688 head->iov_len + buf->page_len + base - shift; in xdr_buf_tail_copy_left()
691 if (WARN_ONCE(shift > head->iov_len + buf->page_len + base, in xdr_buf_tail_copy_left()
704 unsigned int pgto = buf->page_len + base - shift; in xdr_buf_tail_copy_left()
707 if (pgto + pglen > buf->page_len) in xdr_buf_tail_copy_left()
708 pglen = buf->page_len - pgto; in xdr_buf_tail_copy_left()
725 if (base >= buf->page_len) in xdr_buf_pages_copy_left()
727 if (len > buf->page_len - base) in xdr_buf_pages_copy_left()
728 len = buf->page_len - base; in xdr_buf_pages_copy_left()
767 if (base >= buf->page_len) { in xdr_buf_pages_shift_left()
768 xdr_buf_tail_shift_left(buf, base - buf->page_len, len, shift); in xdr_buf_pages_shift_left()
773 if (len <= buf->page_len) in xdr_buf_pages_shift_left()
775 xdr_buf_tail_copy_left(buf, 0, len - buf->page_len, shift); in xdr_buf_pages_shift_left()
820 WARN_ON_ONCE(len > buf->page_len); in xdr_shrink_pagelen()
823 if (buf->page_len > buflen) { in xdr_shrink_pagelen()
824 buf->buflen -= buf->page_len - buflen; in xdr_shrink_pagelen()
825 buf->page_len = buflen; in xdr_shrink_pagelen()
827 if (len >= buf->page_len) in xdr_shrink_pagelen()
829 shift = buf->page_len - len; in xdr_shrink_pagelen()
832 buf->page_len = len; in xdr_shrink_pagelen()
898 int scratch_len = buf->buflen - buf->page_len - buf->tail[0].iov_len; in xdr_init_encode()
964 xdr->buf->page_len += frag1bytes; in xdr_get_next_encode_buffer()
987 xdr->buf->page_len += frag2bytes; in xdr_get_next_encode_buffer()
1020 xdr->buf->page_len += nbytes; in xdr_reserve_space()
1054 thislen = xdr->buf->page_len % PAGE_SIZE; in xdr_reserve_space_vec()
1114 fraglen = min_t(int, buf->len - len, buf->page_len); in xdr_truncate_encode()
1115 buf->page_len -= fraglen; in xdr_truncate_encode()
1118 new = buf->page_base + buf->page_len; in xdr_truncate_encode()
1122 if (buf->page_len) { in xdr_truncate_encode()
1184 buf->page_len = len; in xdr_write_pages()
1223 xdr_stream_set_pos(xdr, base + buf->page_len + buf->head->iov_len); in xdr_set_tail_base()
1236 maxlen = xdr->buf->page_len; in xdr_set_page_base()
1266 base -= xdr->buf->page_len; in xdr_set_page()
1277 if (newbase < xdr->buf->page_len) in xdr_set_next_page()
1328 buf->page_len = len; in xdr_init_decode_pages()
1413 xdr_set_page(xdr, 0, buf->page_len); in xdr_realign_pages()
1431 if (buf->page_len <= len) in xdr_align_pages()
1432 len = buf->page_len; in xdr_align_pages()
1480 if (from >= buf->page_len + buf->tail->iov_len) in xdr_align_data()
1491 if (WARN_ONCE(offset > buf->page_len, in xdr_align_data()
1493 offset, buf->page_len)) in xdr_align_data()
1564 buf->page_len = 0; in xdr_buf_from_iov()
1599 if (base < buf->page_len) { in xdr_buf_subsegment()
1600 subbuf->page_len = min(buf->page_len - base, len); in xdr_buf_subsegment()
1604 len -= subbuf->page_len; in xdr_buf_subsegment()
1607 base -= buf->page_len; in xdr_buf_subsegment()
1610 subbuf->page_len = 0; in xdr_buf_subsegment()
1658 remaining = subbuf->page_len; in xdr_stream_subsegment()
1699 if (buf->page_len) { in xdr_buf_trim()
1700 cur = min_t(unsigned int, buf->page_len, trim); in xdr_buf_trim()
1701 buf->page_len -= cur; in xdr_buf_trim()
1726 this_len = min_t(unsigned int, len, subbuf->page_len); in __read_bytes_from_xdr_buf()
1758 this_len = min_t(unsigned int, len, subbuf->page_len); in __write_bytes_to_xdr_buf()
1863 if (todo && base < buf->page_len) { in xdr_xcode_array2()
1866 avail_here = min(todo, buf->page_len - base); in xdr_xcode_array2()
1958 base = buf->page_len; /* align to start of tail */ in xdr_xcode_array2()
1962 base -= buf->page_len; in xdr_xcode_array2()
2010 buf->head->iov_len + buf->page_len + buf->tail->iov_len) in xdr_encode_array2()
2022 unsigned int page_len, thislen, page_offset; in xdr_process_buf() local
2043 if (offset >= buf->page_len) { in xdr_process_buf()
2044 offset -= buf->page_len; in xdr_process_buf()
2046 page_len = buf->page_len - offset; in xdr_process_buf()
2047 if (page_len > len) in xdr_process_buf()
2048 page_len = len; in xdr_process_buf()
2049 len -= page_len; in xdr_process_buf()
2054 if (thislen > page_len) in xdr_process_buf()
2055 thislen = page_len; in xdr_process_buf()
2060 page_len -= thislen; in xdr_process_buf()
2064 } while (page_len != 0); in xdr_process_buf()