Lines Matching refs:copy
227 size_t copy; in _shift_data_left_pages() local
247 copy = len; in _shift_data_left_pages()
248 if (copy > (PAGE_SIZE - pgto_base)) in _shift_data_left_pages()
249 copy = PAGE_SIZE - pgto_base; in _shift_data_left_pages()
250 if (copy > (PAGE_SIZE - pgfrom_base)) in _shift_data_left_pages()
251 copy = PAGE_SIZE - pgfrom_base; in _shift_data_left_pages()
256 memcpy(vto + pgto_base, vfrom + pgfrom_base, copy); in _shift_data_left_pages()
259 memmove(vto + pgto_base, vto + pgfrom_base, copy); in _shift_data_left_pages()
263 pgto_base += copy; in _shift_data_left_pages()
264 pgfrom_base += copy; in _shift_data_left_pages()
266 } while ((len -= copy) != 0); in _shift_data_left_pages()
309 size_t copy; in _shift_data_right_pages() local
333 copy = len; in _shift_data_right_pages()
334 if (copy > pgto_base) in _shift_data_right_pages()
335 copy = pgto_base; in _shift_data_right_pages()
336 if (copy > pgfrom_base) in _shift_data_right_pages()
337 copy = pgfrom_base; in _shift_data_right_pages()
338 pgto_base -= copy; in _shift_data_right_pages()
339 pgfrom_base -= copy; in _shift_data_right_pages()
344 memcpy(vto + pgto_base, vfrom + pgfrom_base, copy); in _shift_data_right_pages()
347 memmove(vto + pgto_base, vto + pgfrom_base, copy); in _shift_data_right_pages()
351 } while ((len -= copy) != 0); in _shift_data_right_pages()
360 size_t copy; in _shift_data_right_tail() local
374 copy = len; in _shift_data_right_tail()
381 copy = tail->iov_len; in _shift_data_right_tail()
387 copy); in _shift_data_right_tail()
388 result += copy; in _shift_data_right_tail()
409 size_t copy; in _copy_to_pages() local
415 copy = PAGE_SIZE - pgbase; in _copy_to_pages()
416 if (copy > len) in _copy_to_pages()
417 copy = len; in _copy_to_pages()
420 memcpy(vto + pgbase, p, copy); in _copy_to_pages()
423 len -= copy; in _copy_to_pages()
427 pgbase += copy; in _copy_to_pages()
433 p += copy; in _copy_to_pages()
453 size_t copy; in _copy_from_pages() local
459 copy = PAGE_SIZE - pgbase; in _copy_from_pages()
460 if (copy > len) in _copy_from_pages()
461 copy = len; in _copy_from_pages()
464 memcpy(p, vfrom + pgbase, copy); in _copy_from_pages()
467 pgbase += copy; in _copy_from_pages()
472 p += copy; in _copy_from_pages()
474 } while ((len -= copy) != 0); in _copy_from_pages()
523 size_t copy, offs; in xdr_shrink_bufhead() local
538 copy = tail->iov_len - len; in xdr_shrink_bufhead()
540 tail->iov_base, copy); in xdr_shrink_bufhead()
541 result += copy; in xdr_shrink_bufhead()
544 copy = len; in xdr_shrink_bufhead()
545 if (copy > pglen) in xdr_shrink_bufhead()
546 copy = pglen; in xdr_shrink_bufhead()
547 offs = len - copy; in xdr_shrink_bufhead()
549 copy = 0; 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()
552 if (copy != 0) { in xdr_shrink_bufhead()
556 copy); in xdr_shrink_bufhead()
557 result += copy; in xdr_shrink_bufhead()
561 offs = copy = len - pglen; in xdr_shrink_bufhead()
562 if (copy > tail->iov_len) in xdr_shrink_bufhead()
563 copy = tail->iov_len; in xdr_shrink_bufhead()
567 copy); in xdr_shrink_bufhead()
568 result += copy; in xdr_shrink_bufhead()
578 copy = len; in xdr_shrink_bufhead()
580 copy = pglen; in xdr_shrink_bufhead()
583 copy); in xdr_shrink_bufhead()
584 result += copy; in xdr_shrink_bufhead()